serial_8250: pci_enable_device fail is not fully handled
authorAlan Cox <alan@redhat.com>
Mon, 13 Oct 2008 09:36:11 +0000 (10:36 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Oct 2008 16:51:39 +0000 (09:51 -0700)
<rmk> talking about leaks - I noticed that the 'check return of
pci_enable_dev()' in the 8250 pci resume function finally made it in
despite my objections against it (causing stuff in higher levels to
leak).

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/8250_pci.c

index c2f2393..c014ffb 100644 (file)
@@ -2041,9 +2041,9 @@ static int pciserial_resume_one(struct pci_dev *dev)
                 * The device may have been disabled.  Re-enable it.
                 */
                err = pci_enable_device(dev);
+               /* FIXME: We cannot simply error out here */
                if (err)
-                       return err;
-
+                       printk(KERN_ERR "pciserial: Unable to re-enable ports, trying to continue.\n");
                pciserial_resume_ports(priv);
        }
        return 0;