* [PATCH] net: lantiq: Fix returned value in case of error in 'xrx200_probe()'
@ 2018-11-13 17:42 Christophe JAILLET
2018-11-17 3:47 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2018-11-13 17:42 UTC (permalink / raw)
To: hauke, davem; +Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
Return 'err' in the error handling path instead of 0.
Return explicitly 0 in the normal path, instead of 'err', which is known
to be 0 at this point.
Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/lantiq_xrx200.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c
index 8c5ba4b81fb7..2d4d10a017e5 100644
--- a/drivers/net/ethernet/lantiq_xrx200.c
+++ b/drivers/net/ethernet/lantiq_xrx200.c
@@ -512,7 +512,8 @@ static int xrx200_probe(struct platform_device *pdev)
err = register_netdev(net_dev);
if (err)
goto err_unprepare_clk;
- return err;
+
+ return 0;
err_unprepare_clk:
clk_disable_unprepare(priv->clk);
@@ -520,7 +521,7 @@ static int xrx200_probe(struct platform_device *pdev)
err_uninit_dma:
xrx200_hw_cleanup(priv);
- return 0;
+ return err;
}
static int xrx200_remove(struct platform_device *pdev)
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: lantiq: Fix returned value in case of error in 'xrx200_probe()'
2018-11-13 17:42 [PATCH] net: lantiq: Fix returned value in case of error in 'xrx200_probe()' Christophe JAILLET
@ 2018-11-17 3:47 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-11-17 3:47 UTC (permalink / raw)
To: christophe.jaillet; +Cc: hauke, netdev, linux-kernel, kernel-janitors
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Tue, 13 Nov 2018 18:42:24 +0100
> Return 'err' in the error handling path instead of 0.
> Return explicitly 0 in the normal path, instead of 'err', which is known
> to be 0 at this point.
>
> Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-17 3:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 17:42 [PATCH] net: lantiq: Fix returned value in case of error in 'xrx200_probe()' Christophe JAILLET
2018-11-17 3:47 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).