aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sk98lin
diff options
context:
space:
mode:
authorDmitriy Monakhov <dmonakhov@openvz.org>2007-03-06 05:42:01 -0500
committerJeff Garzik <jeff@garzik.org>2007-04-28 11:00:57 -0400
commit2b272221ad3d5c686f1d5ffb3b3c8a45120ad765 (patch)
treeab465a61d4a2d817da9db2660ba65aea96b9783a /drivers/net/sk98lin
parentf1069046b4c7a5750611305433646c1bff3686fd (diff)
sk98lin: handle pci_enable_device() return value in skge_resume()
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>
Diffstat (limited to 'drivers/net/sk98lin')
-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