aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDevendra Naga <devendra.aaru@gmail.com>2012-05-30 21:51:20 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-01 18:44:32 -0400
commitad1be8d345416a794dea39761a374032aa471a76 (patch)
tree42b651f2274bf08ec0b611532e29f54bb3e70ebc /drivers
parentfff3269907897ee91406ece125795f53e722677e (diff)
r8169: call netif_napi_del at errpaths and at driver unload
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/realtek/r8169.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 00b4f56a671c..9757ce3543a0 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6345,6 +6345,8 @@ static void __devexit rtl_remove_one(struct pci_dev *pdev)
6345 6345
6346 cancel_work_sync(&tp->wk.work); 6346 cancel_work_sync(&tp->wk.work);
6347 6347
6348 netif_napi_del(&tp->napi);
6349
6348 unregister_netdev(dev); 6350 unregister_netdev(dev);
6349 6351
6350 rtl_release_firmware(tp); 6352 rtl_release_firmware(tp);
@@ -6668,6 +6670,7 @@ out:
6668 return rc; 6670 return rc;
6669 6671
6670err_out_msi_4: 6672err_out_msi_4:
6673 netif_napi_del(&tp->napi);
6671 rtl_disable_msi(pdev, tp); 6674 rtl_disable_msi(pdev, tp);
6672 iounmap(ioaddr); 6675 iounmap(ioaddr);
6673err_out_free_res_3: 6676err_out_free_res_3: