Skip to contentSkip to conversation

net: phy: marvell: fix return code

PATCH Applied Michael Walle 3 participants 3 messages Jul 6 – Jul 21

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: marvell: fix return code

Return the correct error code, not the value written to the register.

Fixes a219912e0fec ("net: phy: marvell: implement config_inband() method")
---
 drivers/net/phy/marvell.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/marvell.c +1 -1
index 7a578b5aa2ed..f71cffa88406 100644
@@ -753,7 +753,7 @@ static int m88e1111_config_inband(struct phy_device *phydev, unsigned int modes)
 	err = phy_modify(phydev, MII_M1111_PHY_EXT_SR,
 			 MII_M1111_HWCFG_SERIAL_AN_BYPASS, extsr);
 	if (err < 0)
-		return extsr;
+		return err;
 
 	return phy_modify_paged(phydev, MII_MARVELL_FIBER_PAGE, MII_BMCR,
 				BMCR_ANENABLE, bmcr);
Signature · 1 line
2.47.3
maintainer Applied
#2 lore raw
In reply to Michael Walle
Quoted 1 line · On Mon, 6 Jul 2026 14:06:27 +0200 Michael Walle wrote:

Return the correct error code, not the value written to the register.

Applied, thanks.