summaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/netvsc.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2018-03-02 22:49:03 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-05 04:18:20 +0100
commitfcfb4a00d1e514e8313277a01ef919de1113025b (patch)
tree4be3334cafc817001e02a0263070f8cbedc56925 /drivers/net/hyperv/netvsc.c
parenthv_netvsc: only wake transmit queue if link is up (diff)
downloadlinux-fcfb4a00d1e514e8313277a01ef919de1113025b.tar.xz
linux-fcfb4a00d1e514e8313277a01ef919de1113025b.zip
hv_netvsc: fix error unwind handling if vmbus_open fails
Need to delete NAPI association if vmbus_open fails. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r--drivers/net/hyperv/netvsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 686900d61374..ff97a85b2e9d 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -1286,7 +1286,6 @@ struct netvsc_device *netvsc_device_add(struct hv_device *device,
netvsc_channel_cb, net_device->chan_table);
if (ret != 0) {
- netif_napi_del(&net_device->chan_table[0].napi);
netdev_err(ndev, "unable to open channel: %d\n", ret);
goto cleanup;
}
@@ -1319,6 +1318,7 @@ close:
vmbus_close(device->channel);
cleanup:
+ netif_napi_del(&net_device->chan_table[0].napi);
free_netvsc_device(&net_device->rcu);
return ERR_PTR(ret);