mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-29 12:28:27 +02:00
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: Ruan Jinjie <ruanjinjie@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
acf50d1adb
commit
294f48e9b2
@@ -1515,7 +1515,7 @@ static int lan743x_phy_open(struct lan743x_adapter *adapter)
|
||||
&fphy_status, NULL);
|
||||
if (IS_ERR(phydev)) {
|
||||
netdev_err(netdev, "No PHY/fixed_PHY found\n");
|
||||
return -EIO;
|
||||
return PTR_ERR(phydev);
|
||||
}
|
||||
} else {
|
||||
goto return_error;
|
||||
|
||||
Reference in New Issue
Block a user