From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH net-stable 12/24] hv_netvsc: fix error unwind handling if vmbus_open fails Date: Mon, 14 May 2018 15:32:11 -0700 Message-ID: <20180514223223.25433-13-sthemmin@microsoft.com> References: <20180514223223.25433-1-sthemmin@microsoft.com> Cc: netdev@vger.kernel.org, Stephen Hemminger , Stephen Hemminger To: davem@davemloft.net Return-path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:35731 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbeENWcs (ORCPT ); Mon, 14 May 2018 18:32:48 -0400 Received: by mail-pg0-f68.google.com with SMTP id n1-v6so6090732pgs.2 for ; Mon, 14 May 2018 15:32:48 -0700 (PDT) In-Reply-To: <20180514223223.25433-1-sthemmin@microsoft.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Stephen Hemminger commit fcfb4a00d1e514e8313277a01ef919de1113025b upstream Need to delete NAPI association if vmbus_open fails. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- drivers/net/hyperv/netvsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 839b9d6ecb41..b7720b65f5d6 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -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 @@ struct netvsc_device *netvsc_device_add(struct hv_device *device, vmbus_close(device->channel); cleanup: + netif_napi_del(&net_device->chan_table[0].napi); free_netvsc_device(&net_device->rcu); return ERR_PTR(ret); -- 2.17.0