Commit 12b1bc75 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: improve rtl_remove_one

Don't call netif_napi_del() manually, free_netdev() does this for us.
In addition reorder calls to match reverse order of calls in probe().
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 394fe485
...@@ -4996,17 +4996,15 @@ static void rtl_remove_one(struct pci_dev *pdev) ...@@ -4996,17 +4996,15 @@ static void rtl_remove_one(struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev); struct rtl8169_private *tp = netdev_priv(dev);
if (r8168_check_dash(tp)) if (pci_dev_run_wake(pdev))
rtl8168_driver_stop(tp); pm_runtime_get_noresume(&pdev->dev);
netif_napi_del(&tp->napi);
unregister_netdev(dev); unregister_netdev(dev);
rtl_release_firmware(tp); if (r8168_check_dash(tp))
rtl8168_driver_stop(tp);
if (pci_dev_run_wake(pdev)) rtl_release_firmware(tp);
pm_runtime_get_noresume(&pdev->dev);
/* restore original MAC address */ /* restore original MAC address */
rtl_rar_set(tp, dev->perm_addr); rtl_rar_set(tp, dev->perm_addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment