Signed-off-by: Monakhov Dmitriy <[EMAIL PROTECTED]>
---
 drivers/net/sk98lin/skge.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index e94ab25..eea753a 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -5125,7 +5125,12 @@ static int skge_resume(struct pci_dev *pdev)
 
        pci_set_power_state(pdev, PCI_D0);
        pci_restore_state(pdev);
-       pci_enable_device(pdev);
+       ret = pci_enable_device(pdev);
+       if (ret) {
+               printk(KERN_WARNING "sk98lin: unable to enable device %s "
+                               "in resume\n", dev->name);
+               goto err_out;
+       }       
        pci_set_master(pdev);
        if (pAC->GIni.GIMacsFound == 2)
                ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", 
dev);
@@ -5133,10 +5138,8 @@ static int skge_resume(struct pci_dev *pdev)
                ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, 
"sk98lin", dev);
        if (ret) {
                printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", 
dev->irq);
-               pAC->AllocFlag &= ~SK_ALLOC_IRQ;
-               dev->irq = 0;
-               pci_disable_device(pdev);
-               return -EBUSY;
+               ret = -EBUSY;
+               goto err_out_disable_pdev;
        }
 
        netif_device_attach(dev);
@@ -5153,6 +5156,13 @@ static int skge_resume(struct pci_dev *pdev)
        }
 
        return 0;
+
+err_out_disable_pdev:
+       pci_disable_device(pdev);
+err_out:
+       pAC->AllocFlag &= ~SK_ALLOC_IRQ;
+       dev->irq = 0;
+       return ret;
 }
 #else
 #define skge_suspend NULL
-- 
1.4.4.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to