aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/8139cp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 94ab3c31e7e1..a123d28113cd 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -2023,14 +2023,12 @@ static void cp_remove_one (struct pci_dev *pdev)
2023#ifdef CONFIG_PM 2023#ifdef CONFIG_PM
2024static int cp_suspend (struct pci_dev *pdev, pm_message_t state) 2024static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
2025{ 2025{
2026 struct net_device *dev; 2026 struct net_device *dev = pci_get_drvdata(pdev);
2027 struct cp_private *cp; 2027 struct cp_private *cp = netdev_priv(dev);
2028 unsigned long flags; 2028 unsigned long flags;
2029 2029
2030 dev = pci_get_drvdata (pdev); 2030 if (!netif_running(dev))
2031 cp = netdev_priv(dev); 2031 return 0;
2032
2033 if (!dev || !netif_running (dev)) return 0;
2034 2032
2035 netif_device_detach (dev); 2033 netif_device_detach (dev);
2036 netif_stop_queue (dev); 2034 netif_stop_queue (dev);