mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
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>
This commit is contained in:
parent
f1069046b4
commit
2b272221ad
@ -5123,7 +5123,12 @@ static int skge_resume(struct pci_dev *pdev)
|
|||||||
|
|
||||||
pci_set_power_state(pdev, PCI_D0);
|
pci_set_power_state(pdev, PCI_D0);
|
||||||
pci_restore_state(pdev);
|
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);
|
pci_set_master(pdev);
|
||||||
if (pAC->GIni.GIMacsFound == 2)
|
if (pAC->GIni.GIMacsFound == 2)
|
||||||
ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev);
|
ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev);
|
||||||
@ -5131,10 +5136,8 @@ static int skge_resume(struct pci_dev *pdev)
|
|||||||
ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, "sk98lin", dev);
|
ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, "sk98lin", dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq);
|
printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq);
|
||||||
pAC->AllocFlag &= ~SK_ALLOC_IRQ;
|
ret = -EBUSY;
|
||||||
dev->irq = 0;
|
goto err_out_disable_pdev;
|
||||||
pci_disable_device(pdev);
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
netif_device_attach(dev);
|
netif_device_attach(dev);
|
||||||
@ -5151,6 +5154,13 @@ static int skge_resume(struct pci_dev *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_out_disable_pdev:
|
||||||
|
pci_disable_device(pdev);
|
||||||
|
err_out:
|
||||||
|
pAC->AllocFlag &= ~SK_ALLOC_IRQ;
|
||||||
|
dev->irq = 0;
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define skge_suspend NULL
|
#define skge_suspend NULL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user