Răsfoiți Sursa

ntb_netdev: remove from list on exit

The ntb_netdev device is not removed from the global list of devices
upon device removal.  If the device is re-added, the removal code would
find the first instance and try to remove an already removed device.

Signed-off-by: Jon Mason <jon.mason@intel.com>
Jon Mason 12 ani în urmă
părinte
comite
904435cf76
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      drivers/net/ntb_netdev.c

+ 2 - 0
drivers/net/ntb_netdev.c

@@ -375,6 +375,8 @@ static void ntb_netdev_remove(struct pci_dev *pdev)
 	if (dev == NULL)
 		return;
 
+	list_del(&dev->list);
+
 	ndev = dev->ndev;
 
 	unregister_netdev(ndev);