diff options
author | Valerie Henson <val_henson@linux.intel.com> | 2006-09-08 11:15:41 -0700 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-11 09:05:37 -0400 |
commit | 9f486ae1d9ea700a952b77a8881de05ebc1610c3 (patch) | |
tree | 702247e52d2d8ce81758aec6dd3362db52a3cd36 /drivers/net/tulip/de2104x.c | |
parent | 42eab56776b7c9686ee39f8f677a3e3b09caa170 (diff) | |
download | linux-9f486ae1d9ea700a952b77a8881de05ebc1610c3.tar.bz2 |
[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.c | 16 |
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) { struct net_device *dev = pci_get_drvdata (pdev); struct de_private *de = dev->priv; + int retval = 0; rtnl_lock(); if (netif_device_present(dev)) goto out; - if (netif_running(dev)) { - pci_enable_device(pdev); - de_init_hw(de); - netif_device_attach(dev); - } else { - netif_device_attach(dev); + if (!netif_running(dev)) + goto out_attach; + if ((retval = pci_enable_device(pdev))) { + printk (KERN_ERR "%s: pci_enable_device failed in resume\n", + dev->name); + goto out; } + de_init_hw(de); +out_attach: + netif_device_attach(dev); out: rtnl_unlock(); return 0; |