netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] drivers: net: xgene-v2: Fix error return code in xge_mdio_config()
@ 2017-04-25 11:36 Wei Yongjun
  2017-04-25 17:48 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2017-04-25 11:36 UTC (permalink / raw)
  To: Iyappan Subramanian, Keyur Chudgar; +Cc: Wei Yongjun, netdev

From: Wei Yongjun <weiyongjun1@huawei.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@huawei.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),

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-25 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-25 11:36 [PATCH net-next] drivers: net: xgene-v2: Fix error return code in xge_mdio_config() Wei Yongjun
2017-04-25 17:48 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).