struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev);
- if (r8168_check_dash(tp))
- rtl8168_driver_stop(tp);
-
- netif_napi_del(&tp->napi);
+ if (pci_dev_run_wake(pdev))
+ pm_runtime_get_noresume(&pdev->dev);
unregister_netdev(dev);
- rtl_release_firmware(tp);
+ if (r8168_check_dash(tp))
+ rtl8168_driver_stop(tp);
- if (pci_dev_run_wake(pdev))
- pm_runtime_get_noresume(&pdev->dev);
+ rtl_release_firmware(tp);
/* restore original MAC address */
rtl_rar_set(tp, dev->perm_addr);