summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitriy Monakhov <dmonakhov@sw.ru>2007-03-06 11:41:59 +0100
committerJeff Garzik <jeff@garzik.org>2007-03-06 12:10:02 +0100
commite12651539808437a97f3e33c659c3d7b4000e41e (patch)
tree4e5cd7a11a8300f71aa85ec1c591f460e06e34c6
parentdmfe: Fix link detection (diff)
downloadlinux-e12651539808437a97f3e33c659c3d7b4000e41e.tar.xz
linux-e12651539808437a97f3e33c659c3d7b4000e41e.zip
3c59x: Handle pci_enable_device() failure while resuming
Handle pci_enable_device() failure while resuming, we can safely exit here. Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/3c59x.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 716a47210aa3..72995777f809 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -822,11 +822,17 @@ static int vortex_resume(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct vortex_private *vp = netdev_priv(dev);
+ int err;
if (dev && vp) {
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
- pci_enable_device(pdev);
+ err = pci_enable_device(pdev);
+ if (err) {
+ printk(KERN_WARNING "%s: Could not enable device \n",
+ dev->name);
+ return err;
+ }
pci_set_master(pdev);
if (request_irq(dev->irq, vp->full_bus_master_rx ?
&boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) {