PCI: pciserial_resume_one ignored return value of pci_enable_device
authorDirk Hohndel <hohndel@linux.intel.com>
Mon, 29 Oct 2007 13:28:17 +0000 (06:28 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Nov 2007 21:35:17 +0000 (13:35 -0800)
[PATCH] pciserial_resume_one ignored return value of pci_enable_device

Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com>
Acked-by: Alan Cox <alan@redhat.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/serial/8250_pci.c

index 0e357562ce9e37e080c6f5e84ed8f630e92966c7..ceb03c9e749f8f918732d88c635de618d1f04125 100644 (file)
@@ -1986,6 +1986,7 @@ static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
 
 static int pciserial_resume_one(struct pci_dev *dev)
 {
+       int err;
        struct serial_private *priv = pci_get_drvdata(dev);
 
        pci_set_power_state(dev, PCI_D0);
@@ -1995,7 +1996,9 @@ static int pciserial_resume_one(struct pci_dev *dev)
                /*
                 * The device may have been disabled.  Re-enable it.
                 */
-               pci_enable_device(dev);
+               err = pci_enable_device(dev);
+               if (err)
+                       return err;
 
                pciserial_resume_ports(priv);
        }