Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcfb4a00 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

hv_netvsc: fix error unwind handling if vmbus_open fails



Need to delete NAPI association if vmbus_open fails.

Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f4950e45
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1286,7 +1286,6 @@ struct netvsc_device *netvsc_device_add(struct hv_device *device,
			 netvsc_channel_cb, net_device->chan_table);
			 netvsc_channel_cb, net_device->chan_table);


	if (ret != 0) {
	if (ret != 0) {
		netif_napi_del(&net_device->chan_table[0].napi);
		netdev_err(ndev, "unable to open channel: %d\n", ret);
		netdev_err(ndev, "unable to open channel: %d\n", ret);
		goto cleanup;
		goto cleanup;
	}
	}
@@ -1319,6 +1318,7 @@ struct netvsc_device *netvsc_device_add(struct hv_device *device,
	vmbus_close(device->channel);
	vmbus_close(device->channel);


cleanup:
cleanup:
	netif_napi_del(&net_device->chan_table[0].napi);
	free_netvsc_device(&net_device->rcu);
	free_netvsc_device(&net_device->rcu);


	return ERR_PTR(ret);
	return ERR_PTR(ret);