Commit e1265153 authored by Dmitriy Monakhov's avatar Dmitriy Monakhov Committed by Jeff Garzik

3c59x: Handle pci_enable_device() failure while resuming

Handle pci_enable_device() failure while resuming, we can safely exit here.
Signed-off-by: default avatarMonakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent cfa51b9d
...@@ -822,11 +822,17 @@ static int vortex_resume(struct pci_dev *pdev) ...@@ -822,11 +822,17 @@ static int vortex_resume(struct pci_dev *pdev)
{ {
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
struct vortex_private *vp = netdev_priv(dev); struct vortex_private *vp = netdev_priv(dev);
int err;
if (dev && vp) { if (dev && vp) {
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); err = pci_enable_device(pdev);
if (err) {
printk(KERN_WARNING "%s: Could not enable device \n",
dev->name);
return err;
}
pci_set_master(pdev); pci_set_master(pdev);
if (request_irq(dev->irq, vp->full_bus_master_rx ? if (request_irq(dev->irq, vp->full_bus_master_rx ?
&boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) { &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment