drivers: net: xgene-v2: Fix error return code in xge_mdio_config()
PATCH 1/1 drivers: net: xgene-v2: Fix error return code in xge_mdio_config()
From: Wei Yongjun <[email protected]>
Fix to return error code -ENODEV from the no PHY found error handling case instead of 0, as done elsewhere in this function.
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/net/ethernet/apm/xgene-v2/mdio.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/apm/xgene-v2/mdio.c +1 -0
@@ -135,6 +135,7 @@ int xge_mdio_config(struct net_device *ndev) phydev =phy_find_first (mdio_bus);if (!phydev) {dev_err (dev,"no PHY found\n" ); + ret = -ENODEV ; goto err; } phydev = phy_connect(ndev, phydev_name(phydev),
From: Wei Yongjun <[email protected]>
Date: Tue, 25 Apr 2017 11:36:50 +0000
Quoted 6 lines
From: Wei Yongjun <[email protected]>
Fix to return error code
-ENODEVfrom the no PHY found error handling case instead of 0, as done elsewhere in this function.Signed-off-by Wei Yongjun <[email protected]>
Applied, thanks.