Skip to content

Commit 9c6ffba

Browse files
Wei Yongjundavem330
authored andcommitted
hv_netvsc: fix error return code in netvsc_probe()
Fix to return a negative error code from the failover register fail error handling case instead of 0, as done elsewhere in this function. Fixes: 1ff7807 ("netvsc: refactor notifier/event handling code to use the failover framework") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9c54aeb commit 9c6ffba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/hyperv/netvsc_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,8 +2031,10 @@ static int netvsc_probe(struct hv_device *dev,
20312031
}
20322032

20332033
net_device_ctx->failover = failover_register(net, &netvsc_failover_ops);
2034-
if (IS_ERR(net_device_ctx->failover))
2034+
if (IS_ERR(net_device_ctx->failover)) {
2035+
ret = PTR_ERR(net_device_ctx->failover);
20352036
goto err_failover;
2037+
}
20362038

20372039
return ret;
20382040

0 commit comments

Comments
 (0)