]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: phy: marvell: fix return code
authorMichael Walle <mwalle@kernel.org>
Mon, 6 Jul 2026 12:06:27 +0000 (14:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 21 Jul 2026 00:51:46 +0000 (17:51 -0700)
Return the correct error code, not the value written to the register.

Fixes: a219912e0fec ("net: phy: marvell: implement config_inband() method")
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20260706120637.1947685-1-mwalle@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/marvell.c

index 7a578b5aa2ed606d367374b0a7e53aaf0e042b36..f71cffa8840628da418a6aec83b995e89d2f85ce 100644 (file)
@@ -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);