[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170425113650.22730-1-weiyj.lk@gmail.com>
Date: Tue, 25 Apr 2017 11:36:50 +0000
From: Wei Yongjun <weiyj.lk@...il.com>
To: Iyappan Subramanian <isubramanian@....com>,
Keyur Chudgar <kchudgar@....com>
Cc: Wei Yongjun <weiyongjun1@...wei.com>, netdev@...r.kernel.org
Subject: [PATCH net-next] drivers: net: xgene-v2: Fix error return code in xge_mdio_config()
From: Wei Yongjun <weiyongjun1@...wei.com>
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 <weiyongjun1@...wei.com>
---
drivers/net/ethernet/apm/xgene-v2/mdio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/apm/xgene-v2/mdio.c b/drivers/net/ethernet/apm/xgene-v2/mdio.c
index a583c6a..f5fe3bb 100644
--- a/drivers/net/ethernet/apm/xgene-v2/mdio.c
+++ b/drivers/net/ethernet/apm/xgene-v2/mdio.c
@@ -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),
Powered by blists - more mailing lists