Skip to content

Commit acf50d1

Browse files
Ruan Jinjiedavem330
authored andcommitted
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>
1 parent d6499f0 commit acf50d1

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/broadcom/genet

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/genet/bcmmii.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv)
619619
phydev = fixed_phy_register(PHY_POLL, &fphy_status, NULL);
620620
if (!phydev || IS_ERR(phydev)) {
621621
dev_err(kdev, "failed to register fixed PHY device\n");
622-
return -ENODEV;
622+
return PTR_ERR(phydev);
623623
}
624624

625625
/* Make sure we initialize MoCA PHYs with a link down */

0 commit comments

Comments
 (0)