[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221118102423.254023-1-weiyongjun@huaweicloud.com>
Date: Fri, 18 Nov 2022 10:24:23 +0000
From: Wei Yongjun <weiyongjun@...weicloud.com>
To: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Robert Hancock <robert.hancock@...ian.com>
Cc: Wei Yongjun <weiyongjun1@...wei.com>, netdev@...r.kernel.org
Subject: [PATCH] net: phy: at803x: fix error return code in at803x_probe()
From: Wei Yongjun <weiyongjun1@...wei.com>
Fix to return a negative error code from the ccr read error handling
case instead of 0, as done elsewhere in this function.
Fixes: 3265f4218878 ("net: phy: at803x: add fiber support")
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
drivers/net/phy/at803x.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index 349b7b1dbbf2..d49965907561 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -870,8 +870,10 @@ static int at803x_probe(struct phy_device *phydev)
.wolopts = 0,
};
- if (ccr < 0)
+ if (ccr < 0) {
+ ret = ccr;
goto err;
+ }
mode_cfg = ccr & AT803X_MODE_CFG_MASK;
switch (mode_cfg) {
--
2.34.1
Powered by blists - more mailing lists