* [PATCH] net/macb: fix error return code in macb_probe()
@ 2013-04-15 8:04 Nicolas Ferre
2013-04-15 18:10 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Ferre @ 2013-04-15 8:04 UTC (permalink / raw)
To: David S. Miller, netdev
Cc: linux-arm-kernel, linux-kernel, Jean-Christophe PLAGNIOL-VILLARD,
yongjun_wei, Nicolas Ferre
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Original-idea-by: <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
Hi,
This fix was written originally for at91_ether.c and I found it interesting
to adapt it to macb.
Thanks to Wei Yongjun for finding it.
Best regards,
drivers/net/ethernet/cadence/macb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 7fd0e3e..6be513d 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -1602,9 +1602,9 @@ static int __init macb_probe(struct platform_device *pdev)
goto err_out_free_irq;
}
- if (macb_mii_init(bp) != 0) {
+ err = macb_mii_init(bp);
+ if (err)
goto err_out_unregister_netdev;
- }
platform_set_drvdata(pdev, dev);
--
1.8.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/macb: fix error return code in macb_probe()
2013-04-15 8:04 [PATCH] net/macb: fix error return code in macb_probe() Nicolas Ferre
@ 2013-04-15 18:10 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-04-15 18:10 UTC (permalink / raw)
To: nicolas.ferre
Cc: netdev, linux-arm-kernel, linux-kernel, plagnioj, yongjun_wei
From: Nicolas Ferre <nicolas.ferre@atmel.com>
Date: Mon, 15 Apr 2013 10:04:33 +0200
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
>
> Original-idea-by: <yongjun_wei@trendmicro.com.cn>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-15 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-15 8:04 [PATCH] net/macb: fix error return code in macb_probe() Nicolas Ferre
2013-04-15 18:10 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®