Commit 904435cf76a9bdd5eb41b1c4e049d5a64f3a8400

Authored by Jon Mason
1 parent c336acd333

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>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

drivers/net/ntb_netdev.c
... ... @@ -375,6 +375,8 @@
375 375 if (dev == NULL)
376 376 return;
377 377  
  378 + list_del(&dev->list);
  379 +
378 380 ndev = dev->ndev;
379 381  
380 382 unregister_netdev(ndev);