diff options
author | 2023-08-18 15:07:06 +0800 | |
---|---|---|
committer | 2023-08-20 15:13:27 +0100 | |
commit | acf50d1adbf440a01fc9cca16e80dde3da3eccab (patch) | |
tree | 3aff956878a32deba2f134ac52b3d8c0ea281a9f | |
parent | net: bgmac: Return PTR_ERR() for fixed_phy_register() (diff) | |
download | linux-acf50d1adbf4.tar.gz linux-acf50d1adbf4.tar.bz2 linux-acf50d1adbf4.zip |
net: bcmgenet: Return PTR_ERR() for fixed_phy_register()
fixed_phy_register() returns -EPROBE_DEFER, -EINVAL and -EBUSY,
etc, in addition to -ENODEV. The Best practice is to return these
error codes with PTR_ERR().
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Acked-by: Doug Berger <opendmb@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c index 0092e46c46f8..4012a141a229 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c @@ -619,7 +619,7 @@ static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv) phydev = fixed_phy_register(PHY_POLL, &fphy_status, NULL); if (!phydev || IS_ERR(phydev)) { dev_err(kdev, "failed to register fixed PHY device\n"); - return -ENODEV; + return PTR_ERR(phydev); } /* Make sure we initialize MoCA PHYs with a link down */ |