Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cad1b9da74f14c5f15b63ffc93c53debe09b3781
Commit:     cad1b9da74f14c5f15b63ffc93c53debe09b3781
Parent:     f6c4286590e7cb13dd16cb2a6e4dc4a27ce6df1d
Author:     Jeff Garzik <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 00:15:54 2007 -0400
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 16:17:59 2007 -0400

    [netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails
    
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/eepro100.c |    7 ++++++-
 drivers/net/ne2k-pci.c |    7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 9afa47e..3c54014 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 995c0a5..cfdeaf7 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);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to