Commit 87c33315 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski

net: phy: air_en8811h: fix some error codes

These error paths accidentally return "ret" which is zero/success
instead of the correct error code.

Fixes: 71e79430 ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/7ef2e230-dfb7-4a77-8973-9e5be1a99fc2@moroto.mountainSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 775d2e2b
......@@ -272,11 +272,11 @@ static int __air_buckpbus_reg_read(struct phy_device *phydev,
pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
if (pbus_data_high < 0)
return ret;
return pbus_data_high;
pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
if (pbus_data_low < 0)
return ret;
return pbus_data_low;
*pbus_data = pbus_data_low | (pbus_data_high << 16);
return 0;
......@@ -323,11 +323,11 @@ static int __air_buckpbus_reg_modify(struct phy_device *phydev,
pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
if (pbus_data_high < 0)
return ret;
return pbus_data_high;
pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
if (pbus_data_low < 0)
return ret;
return pbus_data_low;
pbus_data_old = pbus_data_low | (pbus_data_high << 16);
pbus_data_new = (pbus_data_old & ~mask) | set;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment