Skip to content

Commit ca8eddc

Browse files
Wei Yongjundavem330
authored andcommitted
net: ethernet: nb8800: fix error return code in nb8800_open()
Fix to return error code -ENODEV from the of_phy_connect() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Mans Rullgard <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ea93900 commit ca8eddc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/aurora/nb8800.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,8 +975,10 @@ static int nb8800_open(struct net_device *dev)
975975
phydev = of_phy_connect(dev, priv->phy_node,
976976
nb8800_link_reconfigure, 0,
977977
priv->phy_mode);
978-
if (!phydev)
978+
if (!phydev) {
979+
err = -ENODEV;
979980
goto err_free_irq;
981+
}
980982

981983
nb8800_pause_adv(dev);
982984

0 commit comments

Comments
 (0)