projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc577b0
)
failover: Fix error return code in net_failover_create
author
YueHaibing
<yuehaibing@huawei.com>
Thu, 6 Sep 2018 13:04:12 +0000
(21:04 +0800)
committer
David S. Miller
<davem@davemloft.net>
Sat, 8 Sep 2018 17:28:56 +0000
(10:28 -0700)
if failover_register failed, 'err' code should be set correctly
Fixes: cfc80d9a1163 ("net: Introduce net_failover driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/net_failover.c
patch
|
blob
|
history
diff --git
a/drivers/net/net_failover.c
b/drivers/net/net_failover.c
index 8524fe4fddea238cccebada127e8638be39acb2e..e964d312f4ca32acda1e13adbca0fb42b0cf465b 100644
(file)
--- a/
drivers/net/net_failover.c
+++ b/
drivers/net/net_failover.c
@@
-764,8
+764,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;