diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2012-10-05 23:29:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-13 05:28:14 +0900 |
commit | f074e600bf3cd644c3bdbcbc238dce53952d34cb (patch) | |
tree | 772c5334c1dfcf7e5054e527fa79159895e6fe36 | |
parent | c90334077ffa833ecf89f1645d21f0b9d5d51553 (diff) | |
download | lwn-f074e600bf3cd644c3bdbcbc238dce53952d34cb.tar.gz lwn-f074e600bf3cd644c3bdbcbc238dce53952d34cb.zip |
r8169: call netif_napi_del at errpaths and at driver unload
commit ad1be8d345416a794dea39761a374032aa471a76 upstream.
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/r8169.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 5b94dc969e90..f7a56f465b08 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -3706,6 +3706,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: @@ -3731,6 +3732,8 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev) cancel_delayed_work_sync(&tp->task); + netif_napi_del(&tp->napi); + unregister_netdev(dev); rtl_release_firmware(tp); |