projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53da09e
)
ibmvnic: Validate napi exist before disabling them
author
Nathan Fontenot
<nfont@linux.vnet.ibm.com>
Fri, 21 Apr 2017 19:39:10 +0000
(15:39 -0400)
committer
David S. Miller
<davem@davemloft.net>
Mon, 24 Apr 2017 16:52:13 +0000
(12:52 -0400)
Validate that the napi structs exist before trying to disable them
at driver close.
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
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/ibm/ibmvnic.c
b/drivers/net/ethernet/ibm/ibmvnic.c
index 115f21694994f3ed8925b01ee0a107a19ff53073..5a916a2f91be1bee6ec8532b0a994e1d737d0e9a 100644
(file)
--- a/
drivers/net/ethernet/ibm/ibmvnic.c
+++ b/
drivers/net/ethernet/ibm/ibmvnic.c
@@
-729,8
+729,10
@@
static int ibmvnic_close(struct net_device *netdev)
adapter->closing = true;
disable_sub_crqs(adapter);
- for (i = 0; i < adapter->req_rx_queues; i++)
- napi_disable(&adapter->napi[i]);
+ if (adapter->napi) {
+ for (i = 0; i < adapter->req_rx_queues; i++)
+ napi_disable(&adapter->napi[i]);
+ }
if (!adapter->failover)
netif_tx_stop_all_queues(netdev);