* [PATCH net-next] bgmac: propagate error codes in bgmac_probe()
@ 2014-01-13 3:05 Florian Fainelli
2014-01-13 5:58 ` Rafał Miłecki
2014-01-15 2:18 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Florian Fainelli @ 2014-01-13 3:05 UTC (permalink / raw)
To: netdev; +Cc: davem, zajec5, hauke, nlhintz, sd, bhutchings, Florian Fainelli
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>
---
Sabrina, Ben, this relates to the thread on -ENOTSUPP, other places in
the driver need fixing too, but this has to be done as a separate patch
anyway.
drivers/net/ethernet/broadcom/bgmac.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 7f968a9..0297a79 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;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] bgmac: propagate error codes in bgmac_probe()
2014-01-13 3:05 [PATCH net-next] bgmac: propagate error codes in bgmac_probe() Florian Fainelli
@ 2014-01-13 5:58 ` Rafał Miłecki
2014-01-15 2:18 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Rafał Miłecki @ 2014-01-13 5:58 UTC (permalink / raw)
To: Florian Fainelli
Cc: Network Development, David Miller, Hauke Mehrtens, Nathan Hintz,
sd, bhutchings
2014/1/13 Florian Fainelli <f.fainelli@gmail.com>:
> 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>
--
Rafał
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] bgmac: propagate error codes in bgmac_probe()
2014-01-13 3:05 [PATCH net-next] bgmac: propagate error codes in bgmac_probe() Florian Fainelli
2014-01-13 5:58 ` Rafał Miłecki
@ 2014-01-15 2:18 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-01-15 2:18 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, zajec5, hauke, nlhintz, sd, bhutchings
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Sun, 12 Jan 2014 19:05:55 -0800
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-15 2:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-13 3:05 [PATCH net-next] bgmac: propagate error codes in bgmac_probe() Florian Fainelli
2014-01-13 5:58 ` Rafał Miłecki
2014-01-15 2:18 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox