* [PATCH net-next] failover: Fix error return code in net_failover_create
@ 2018-09-06 13:04 YueHaibing
2018-09-08 17:31 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-09-06 13:04 UTC (permalink / raw)
To: davem, alexander.h.duyck, jeffrey.t.kirsher, liran.alon,
sridhar.samudrala, stephen, dan.carpenter
Cc: linux-kernel, netdev, YueHaibing
if failover_register failed, 'err' code should be set correctly
Fixes: cfc80d9a1163 ("net: Introduce net_failover driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/net_failover.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/net_failover.c b/drivers/net/net_failover.c
index 192ae1c..cbcb9f2 100644
--- a/drivers/net/net_failover.c
+++ b/drivers/net/net_failover.c
@@ -761,8 +761,10 @@ struct failover *net_failover_create(struct net_device *standby_dev)
netif_carrier_off(failover_dev);
failover = failover_register(failover_dev, &net_failover_ops);
- if (IS_ERR(failover))
+ if (IS_ERR(failover)) {
+ err = PTR_ERR(failover);
goto err_failover_register;
+ }
return failover;
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] failover: Fix error return code in net_failover_create
2018-09-06 13:04 [PATCH net-next] failover: Fix error return code in net_failover_create YueHaibing
@ 2018-09-08 17:31 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-09-08 17:31 UTC (permalink / raw)
To: yuehaibing
Cc: alexander.h.duyck, jeffrey.t.kirsher, liran.alon,
sridhar.samudrala, stephen, dan.carpenter, linux-kernel, netdev
From: YueHaibing <yuehaibing@huawei.com>
Date: Thu, 6 Sep 2018 21:04:12 +0800
> if failover_register failed, 'err' code should be set correctly
>
> Fixes: cfc80d9a1163 ("net: Introduce net_failover driver")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-08 17:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-06 13:04 [PATCH net-next] failover: Fix error return code in net_failover_create YueHaibing
2018-09-08 17:31 ` 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).