diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2017-04-25 13:36:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-25 19:48:06 +0200 |
commit | 5e1fc7c5ba00599ccd7096eef3e9fd3362c1230f (patch) | |
tree | 3027d2f9dd089c2e2475fdcf40e688729b47f4dd /drivers/net/ethernet/apm/xgene-v2/mdio.c | |
parent | net: Generic XDP (diff) | |
download | linux-5e1fc7c5ba00599ccd7096eef3e9fd3362c1230f.tar.xz linux-5e1fc7c5ba00599ccd7096eef3e9fd3362c1230f.zip |
drivers: net: xgene-v2: Fix error return code in xge_mdio_config()
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/apm/xgene-v2/mdio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/apm/xgene-v2/mdio.c b/drivers/net/ethernet/apm/xgene-v2/mdio.c index a583c6a9a5ea..f5fe3bb2e59d 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), |