summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-01-12 19:05:55 -0800
committerDavid S. Miller <davem@davemloft.net>2014-01-14 18:19:20 -0800
commit5571415c9685acc2c768b33d0be40b3f46869f14 (patch)
tree535488b719744a19d08b1b1ea3d77e9cd47ce437
parentec35b61ea59aa6b1ecc8d8452b225e4677e32627 (diff)
downloadlinux-5571415c9685acc2c768b33d0be40b3f46869f14.tar.bz2
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 <f.fainelli@gmail.com> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bgmac.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 7f968a9b52c8..0297a79a38e1 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1518,14 +1518,12 @@ static int bgmac_probe(struct bcma_device *core)
err = bgmac_mii_register(bgmac);
if (err) {
bgmac_err(bgmac, "Cannot register MDIO\n");
- err = -ENOTSUPP;
goto err_dma_free;
}
err = register_netdev(bgmac->net_dev);
if (err) {
bgmac_err(bgmac, "Cannot register net device\n");
- err = -ENOTSUPP;
goto err_mii_unregister;
}