From: Jon Mason Date: Thu, 18 Apr 2013 20:36:43 +0000 (-0700) Subject: ntb_netdev: remove from list on exit X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=904435cf76a9bdd5eb41b1c4e049d5a64f3a8400;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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);