Commit 294f48e9 authored by Ruan Jinjie's avatar Ruan Jinjie Committed by David S. Miller

net: lan743x: Return PTR_ERR() for fixed_phy_register()

fixed_phy_register() returns -EPROBE_DEFER, -EINVAL and -EBUSY,
etc, in addition to -EIO. The Best practice is to return these
error codes with PTR_ERR().
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent acf50d1a
...@@ -1515,7 +1515,7 @@ static int lan743x_phy_open(struct lan743x_adapter *adapter) ...@@ -1515,7 +1515,7 @@ static int lan743x_phy_open(struct lan743x_adapter *adapter)
&fphy_status, NULL); &fphy_status, NULL);
if (IS_ERR(phydev)) { if (IS_ERR(phydev)) {
netdev_err(netdev, "No PHY/fixed_PHY found\n"); netdev_err(netdev, "No PHY/fixed_PHY found\n");
return -EIO; return PTR_ERR(phydev);
} }
} else { } else {
goto return_error; goto return_error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment