summaryrefslogtreecommitdiffstats
path: root/drivers/net/ntb_netdev.c
diff options
context:
space:
mode:
authorJon Mason <jon.mason@intel.com>2013-04-18 13:36:43 -0700
committerJon Mason <jon.mason@intel.com>2013-05-15 10:58:14 -0700
commit904435cf76a9bdd5eb41b1c4e049d5a64f3a8400 (patch)
tree166b5d3775063b7ceaa243e7fee9d550d2d84a3e /drivers/net/ntb_netdev.c
parentc336acd3331dcc191a97dbc66a557d47741657c7 (diff)
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>
Diffstat (limited to 'drivers/net/ntb_netdev.c')
-rw-r--r--drivers/net/ntb_netdev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c
index ed947dd76fb..f3cdf64997d 100644
--- a/drivers/net/ntb_netdev.c
+++ b/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);