summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Mason <jon.mason@intel.com>2013-04-18 22:36:43 +0200
committerJon Mason <jon.mason@intel.com>2013-05-15 19:58:14 +0200
commit904435cf76a9bdd5eb41b1c4e049d5a64f3a8400 (patch)
tree166b5d3775063b7ceaa243e7fee9d550d2d84a3e
parentNTB: memcpy lockup workaround (diff)
downloadlinux-904435cf76a9bdd5eb41b1c4e049d5a64f3a8400.tar.xz
linux-904435cf76a9bdd5eb41b1c4e049d5a64f3a8400.zip
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>
-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 ed947dd76fbd..f3cdf64997d6 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);