Commit 32c0e1fe authored by Jon Mason's avatar Jon Mason Committed by Greg Kroah-Hartman

ntb_netdev: remove from list on exit

commit 904435cf upstream.

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: default avatarJon Mason <jon.mason@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e98a173
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment