aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mason <jon.mason@intel.com>2013-04-18 13:36:43 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-24 11:36:05 -0700
commit32c0e1fe6fe8a9992f582b60a4f15858add89fcb (patch)
tree0fd46b6c00aeff1c42800b4d5783a02b4137321e
parent7e98a1733e34e1564a2668ea6210df94cf572a22 (diff)
downloadvexpress-lsk-32c0e1fe6fe8a9992f582b60a4f15858add89fcb.tar.gz
ntb_netdev: remove from list on exit
commit 904435cf76a9bdd5eb41b1c4e049d5a64f3a8400 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: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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);