diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2012-05-31 01:51:20 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-16 09:03:44 -0700 |
commit | 0440cf6d8187e69ef2eb52db5f7690f1da2a2c1c (patch) | |
tree | 664e93fa24ef445b05c7f1599a83b67fc54fd302 | |
parent | 6fc5186c0628a5dfcfdbc9355bad225613fa7618 (diff) | |
download | linux-3.10-0440cf6d8187e69ef2eb52db5f7690f1da2a2c1c.tar.gz linux-3.10-0440cf6d8187e69ef2eb52db5f7690f1da2a2c1c.tar.bz2 linux-3.10-0440cf6d8187e69ef2eb52db5f7690f1da2a2c1c.zip |
r8169: call netif_napi_del at errpaths and at driver unload
[ Upstream commit ad1be8d345416a794dea39761a374032aa471a76 ]
when register_netdev fails, the init'ed NAPIs by netif_napi_add must be
deleted with netif_napi_del, and also when driver unloads, it should
delete the NAPI before unregistering netdevice using unregister_netdev.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index ce6b44d1f25..161e0451747 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -5966,6 +5966,8 @@ static void __devexit rtl_remove_one(struct pci_dev *pdev) cancel_work_sync(&tp->wk.work); + netif_napi_del(&tp->napi); + unregister_netdev(dev); rtl_release_firmware(tp); @@ -6288,6 +6290,7 @@ out: return rc; err_out_msi_4: + netif_napi_del(&tp->napi); rtl_disable_msi(pdev, tp); iounmap(ioaddr); err_out_free_res_3: |