Skip to content

Commit

Permalink
8139too: Add netif_napi_del in the driver
Browse files Browse the repository at this point in the history
For linux-3.18.0
The driver lacks netif_napi_del in the normal path and error path
to match the call of netif_napi_add in rtl8139_init_one.
This patch fixes this problem.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jia-Ju Bai authored and David S. Miller committed Dec 22, 2014
1 parent 6402a57 commit ea3c9e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/realtek/8139too.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@ static int rtl8139_init_one(struct pci_dev *pdev,
return 0;

err_out:
netif_napi_del(&tp->napi);
__rtl8139_cleanup_dev (dev);
pci_disable_device (pdev);
return i;
Expand All @@ -1124,6 +1125,7 @@ static void rtl8139_remove_one(struct pci_dev *pdev)
assert (dev != NULL);

cancel_delayed_work_sync(&tp->thread);
netif_napi_del(&tp->napi);

unregister_netdev (dev);

Expand Down

0 comments on commit ea3c9e1

Please sign in to comment.