Skip to content

Commit

Permalink
drivers: net: xgene-v2: Fix error return code in xge_mdio_config()
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wei Yongjun authored and davem330 committed Apr 25, 2017
1 parent b5cdae3 commit 5e1fc7c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/apm/xgene-v2/mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 5e1fc7c

Please sign in to comment.