[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170421193910.11030.9896.stgit@ltcalpine2-lp23.aus.stglabs.ibm.com>
Date: Fri, 21 Apr 2017 15:39:10 -0400
From: Nathan Fontenot <nfont@...ux.vnet.ibm.com>
To: netdev@...r.kernel.org
Cc: brking@...ux.vnet.ibm.com, jallen@...ux.vnet.ibm.com,
muvic@...ux.vnet.ibm.com, tlfalcon@...ux.vnet.ibm.com
Subject: [PATCH net-next 6/7] ibmvnic: Validate napi exist before disabling
them
Validate that the napi structs exist before trying to disable them
at driver close.
Signed-off-by: Nathan Fontenot <nfont@...ux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 115f216..5a916a2 100644
--- 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);
Powered by blists - more mailing lists