From: Jeff Garzik Date: Tue, 17 Jul 2007 04:15:54 +0000 (-0400) Subject: [netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails X-Git-Tag: v2.6.23-rc1~515^2~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cad1b9da74f14c5f15b63ffc93c53debe09b3781;p=linux-2.6-omap-h63xx.git [netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index 9afa47edfc5..3c54014acec 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c @@ -2292,10 +2292,15 @@ static int eepro100_resume(struct pci_dev *pdev) struct net_device *dev = pci_get_drvdata (pdev); struct speedo_private *sp = netdev_priv(dev); void __iomem *ioaddr = sp->regs; + int rc; pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); - pci_enable_device(pdev); + + rc = pci_enable_device(pdev); + if (rc) + return rc; + pci_set_master(pdev); if (!netif_running(dev)) diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c index 995c0a5d406..cfdeaf7aa16 100644 --- a/drivers/net/ne2k-pci.c +++ b/drivers/net/ne2k-pci.c @@ -669,10 +669,15 @@ static int ne2k_pci_suspend (struct pci_dev *pdev, pm_message_t state) static int ne2k_pci_resume (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); + int rc; pci_set_power_state(pdev, 0); pci_restore_state(pdev); - pci_enable_device(pdev); + + rc = pci_enable_device(pdev); + if (rc) + return rc; + NS8390_init(dev, 1); netif_device_attach(dev);