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

Commit 3ca19932 authored by Nathan Fontenot's avatar Nathan Fontenot Committed by David S. Miller
Browse files

ibmvnic: Validate napi exist before disabling them



Validate that the napi structs exist before trying to disable them
at driver close.

Signed-off-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 53da09e9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -729,8 +729,10 @@ static int ibmvnic_close(struct net_device *netdev)
	adapter->closing = true;
	disable_sub_crqs(adapter);

	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);