diff options
author | Valerie Henson <val_henson@linux.intel.com> | 2006-09-08 20:15:41 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-11 15:05:37 +0200 |
commit | 9f486ae1d9ea700a952b77a8881de05ebc1610c3 (patch) | |
tree | 702247e52d2d8ce81758aec6dd3362db52a3cd36 /drivers/net/tulip/winbond-840.c | |
parent | [PATCH] Use tulip.h in winbond-840.c (diff) | |
download | linux-9f486ae1d9ea700a952b77a8881de05ebc1610c3.tar.xz linux-9f486ae1d9ea700a952b77a8881de05ebc1610c3.zip |
[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/winbond-840.c')
-rw-r--r-- | drivers/net/tulip/winbond-840.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index b54378fac8f0..a64d6828d9aa 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c @@ -1626,14 +1626,18 @@ static int w840_resume (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); struct netdev_private *np = netdev_priv(dev); + int retval = 0; rtnl_lock(); if (netif_device_present(dev)) goto out; /* device not suspended */ if (netif_running(dev)) { - pci_enable_device(pdev); - /* pci_power_on(pdev); */ - + if ((retval = pci_enable_device(pdev))) { + printk (KERN_ERR + "%s: pci_enable_device failed in resume\n", + dev->name); + goto out; + } spin_lock_irq(&np->lock); iowrite32(1, np->base_addr+PCIBusCfg); ioread32(np->base_addr+PCIBusCfg); @@ -1651,7 +1655,7 @@ static int w840_resume (struct pci_dev *pdev) } out: rtnl_unlock(); - return 0; + return retval; } #endif |