hv_netvsc: fix error unwind handling if vmbus_open fails
[ Commit fcfb4a00d1
upstream. ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4857dca4dd
commit
0ed8945b3a
@ -1288,7 +1288,6 @@ struct netvsc_device *netvsc_device_add(struct hv_device *device,
|
||||
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;
|
||||
}
|
||||
@ -1321,6 +1320,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);
|
||||
|
Reference in New Issue
Block a user