aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/de2104x.c
diff options
context:
space:
mode:
authorValerie Henson <val_henson@linux.intel.com>2006-09-08 14:15:41 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-11 09:05:37 -0400
commit9f486ae1d9ea700a952b77a8881de05ebc1610c3 (patch)
tree702247e52d2d8ce81758aec6dd3362db52a3cd36 /drivers/net/tulip/de2104x.c
parent42eab56776b7c9686ee39f8f677a3e3b09caa170 (diff)
[PATCH] Handle pci_enable_device() errors in resume
Signed-off-by: Valerie Henson <val_henson@linux.intel.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tulip/de2104x.c')
-rw-r--r--drivers/net/tulip/de2104x.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 350a73e99a85..17a2ebaef58c 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -2138,17 +2138,21 @@ static int de_resume (struct pci_dev *pdev)
2138{ 2138{
2139 struct net_device *dev = pci_get_drvdata (pdev); 2139 struct net_device *dev = pci_get_drvdata (pdev);
2140 struct de_private *de = dev->priv; 2140 struct de_private *de = dev->priv;
2141 int retval = 0;
2141 2142
2142 rtnl_lock(); 2143 rtnl_lock();
2143 if (netif_device_present(dev)) 2144 if (netif_device_present(dev))
2144 goto out; 2145 goto out;
2145 if (netif_running(dev)) { 2146 if (!netif_running(dev))
2146 pci_enable_device(pdev); 2147 goto out_attach;
2147 de_init_hw(de); 2148 if ((retval = pci_enable_device(pdev))) {
2148 netif_device_attach(dev); 2149 printk (KERN_ERR "%s: pci_enable_device failed in resume\n",
2149 } else { 2150 dev->name);
2150 netif_device_attach(dev); 2151 goto out;
2151 } 2152 }
2153 de_init_hw(de);
2154out_attach:
2155 netif_device_attach(dev);
2152out: 2156out:
2153 rtnl_unlock(); 2157 rtnl_unlock();
2154 return 0; 2158 return 0;