mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-23 22:34:21 +08:00
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>
This commit is contained in:
parent
fff3269907
commit
ad1be8d345
@ -6345,6 +6345,8 @@ static void __devexit rtl_remove_one(struct pci_dev *pdev)
|
|||||||
|
|
||||||
cancel_work_sync(&tp->wk.work);
|
cancel_work_sync(&tp->wk.work);
|
||||||
|
|
||||||
|
netif_napi_del(&tp->napi);
|
||||||
|
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
|
|
||||||
rtl_release_firmware(tp);
|
rtl_release_firmware(tp);
|
||||||
@ -6668,6 +6670,7 @@ out:
|
|||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
err_out_msi_4:
|
err_out_msi_4:
|
||||||
|
netif_napi_del(&tp->napi);
|
||||||
rtl_disable_msi(pdev, tp);
|
rtl_disable_msi(pdev, tp);
|
||||||
iounmap(ioaddr);
|
iounmap(ioaddr);
|
||||||
err_out_free_res_3:
|
err_out_free_res_3:
|
||||||
|
Loading…
Reference in New Issue
Block a user