aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sk98lin/skge.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index e0a93005e6dc..bf218621db16 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -5123,7 +5123,12 @@ static int skge_resume(struct pci_dev *pdev)
5123 5123
5124 pci_set_power_state(pdev, PCI_D0); 5124 pci_set_power_state(pdev, PCI_D0);
5125 pci_restore_state(pdev); 5125 pci_restore_state(pdev);
5126 pci_enable_device(pdev); 5126 ret = pci_enable_device(pdev);
5127 if (ret) {
5128 printk(KERN_WARNING "sk98lin: unable to enable device %s "
5129 "in resume\n", dev->name);
5130 goto err_out;
5131 }
5127 pci_set_master(pdev); 5132 pci_set_master(pdev);
5128 if (pAC->GIni.GIMacsFound == 2) 5133 if (pAC->GIni.GIMacsFound == 2)
5129 ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev); 5134 ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev);
@@ -5131,10 +5136,8 @@ static int skge_resume(struct pci_dev *pdev)
5131 ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, "sk98lin", dev); 5136 ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, "sk98lin", dev);
5132 if (ret) { 5137 if (ret) {
5133 printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq); 5138 printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq);
5134 pAC->AllocFlag &= ~SK_ALLOC_IRQ; 5139 ret = -EBUSY;
5135 dev->irq = 0; 5140 goto err_out_disable_pdev;
5136 pci_disable_device(pdev);
5137 return -EBUSY;
5138 } 5141 }
5139 5142
5140 netif_device_attach(dev); 5143 netif_device_attach(dev);
@@ -5151,6 +5154,13 @@ static int skge_resume(struct pci_dev *pdev)
5151 } 5154 }
5152 5155
5153 return 0; 5156 return 0;
5157
5158err_out_disable_pdev:
5159 pci_disable_device(pdev);
5160err_out:
5161 pAC->AllocFlag &= ~SK_ALLOC_IRQ;
5162 dev->irq = 0;
5163 return ret;
5154} 5164}
5155#else 5165#else
5156#define skge_suspend NULL 5166#define skge_suspend NULL