Skip to content

Commit 5571415

Browse files
ffainellidavem330
authored andcommitted
bgmac: propagate error codes in bgmac_probe()
bgmac_mii_register() and register_netdev() both return appropriate error codes for the failures they would encounter, propagate this error code instead of overriding the value with -ENOTSUPP which is not the correct error code to return. Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Rafał Miłecki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ec35b61 commit 5571415

File tree

1 file changed

+0
-2
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+0
-2
lines changed

drivers/net/ethernet/broadcom/bgmac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,14 +1518,12 @@ static int bgmac_probe(struct bcma_device *core)
15181518
err = bgmac_mii_register(bgmac);
15191519
if (err) {
15201520
bgmac_err(bgmac, "Cannot register MDIO\n");
1521-
err = -ENOTSUPP;
15221521
goto err_dma_free;
15231522
}
15241523

15251524
err = register_netdev(bgmac->net_dev);
15261525
if (err) {
15271526
bgmac_err(bgmac, "Cannot register net device\n");
1528-
err = -ENOTSUPP;
15291527
goto err_mii_unregister;
15301528
}
15311529

0 commit comments

Comments
 (0)