[next,S94,13/13] i40e: set vsi->netdev to NULL after free_netdev()

Message ID 20180802004036.89363-13-alice.michael@intel.com
State Superseded
Delegated to: Jeff Kirsher
Headers show
Series
  • Untitled series #58958
Related show

Commit Message

Alice Michael Aug. 2, 2018, 12:40 a.m.
From: Patryk Małek <patryk.malek@intel.com>

After adding a special case for recovery mode in i40e_remove
we have forgotten to set vsi->netdev to NULL after calling free_netdev()
on it. This patch fixes that.

Signed-off-by: Patryk Małek <patryk.malek@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index e46f8ab..4300483 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -14337,6 +14337,7 @@  static void i40e_remove(struct pci_dev *pdev)
 		 */
 		unregister_netdev(vsi->netdev);
 		free_netdev(vsi->netdev);
+		vsi->netdev = NULL;
 
 		goto unmap;
 	}