diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/skge.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index e0489578945d..776692946562 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -3802,6 +3802,9 @@ static int skge_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3802 | struct skge_hw *hw = pci_get_drvdata(pdev); | 3802 | struct skge_hw *hw = pci_get_drvdata(pdev); |
3803 | int i, err, wol = 0; | 3803 | int i, err, wol = 0; |
3804 | 3804 | ||
3805 | if (!hw) | ||
3806 | return 0; | ||
3807 | |||
3805 | err = pci_save_state(pdev); | 3808 | err = pci_save_state(pdev); |
3806 | if (err) | 3809 | if (err) |
3807 | return err; | 3810 | return err; |
@@ -3830,6 +3833,9 @@ static int skge_resume(struct pci_dev *pdev) | |||
3830 | struct skge_hw *hw = pci_get_drvdata(pdev); | 3833 | struct skge_hw *hw = pci_get_drvdata(pdev); |
3831 | int i, err; | 3834 | int i, err; |
3832 | 3835 | ||
3836 | if (!hw) | ||
3837 | return 0; | ||
3838 | |||
3833 | err = pci_set_power_state(pdev, PCI_D0); | 3839 | err = pci_set_power_state(pdev, PCI_D0); |
3834 | if (err) | 3840 | if (err) |
3835 | goto out; | 3841 | goto out; |
@@ -3868,6 +3874,9 @@ static void skge_shutdown(struct pci_dev *pdev) | |||
3868 | struct skge_hw *hw = pci_get_drvdata(pdev); | 3874 | struct skge_hw *hw = pci_get_drvdata(pdev); |
3869 | int i, wol = 0; | 3875 | int i, wol = 0; |
3870 | 3876 | ||
3877 | if (!hw) | ||
3878 | return; | ||
3879 | |||
3871 | for (i = 0; i < hw->ports; i++) { | 3880 | for (i = 0; i < hw->ports; i++) { |
3872 | struct net_device *dev = hw->dev[i]; | 3881 | struct net_device *dev = hw->dev[i]; |
3873 | struct skge_port *skge = netdev_priv(dev); | 3882 | struct skge_port *skge = netdev_priv(dev); |