]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ibmvnic: Call napi_disable instead of napi_enable in failure path
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Fri, 10 Feb 2017 18:29:06 +0000 (13:29 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Feb 2017 02:24:15 +0000 (21:24 -0500)
The failure path in ibmvnic_open() mistakenly makes a second call
to napi_enable instead of calling napi_disable. This can result
in a BUG_ON for any queues that were enabled in the previous call
to napi_enable.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index c7150343342d8c84bb8a08345c5068427a8538aa..752b0822b020b287eda026d1d55de0f7a4799247 100644 (file)
@@ -506,7 +506,7 @@ rx_pool_alloc_failed:
        adapter->rx_pool = NULL;
 rx_pool_arr_alloc_failed:
        for (i = 0; i < adapter->req_rx_queues; i++)
-               napi_enable(&adapter->napi[i]);
+               napi_disable(&adapter->napi[i]);
 alloc_napi_failed:
        return -ENOMEM;
 }