Skip to content

Commit

Permalink
r8169: call netif_napi_del at errpaths and at driver unload
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Devendra Naga authored and David S. Miller committed Jun 1, 2012
1 parent fff3269 commit ad1be8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -6345,6 +6345,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);
Expand Down Expand Up @@ -6668,6 +6670,7 @@ rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return rc;

err_out_msi_4:
netif_napi_del(&tp->napi);
rtl_disable_msi(pdev, tp);
iounmap(ioaddr);
err_out_free_res_3:
Expand Down

0 comments on commit ad1be8d

Please sign in to comment.