From: Randy Dunlap <[EMAIL PROTECTED]> Check PCI interface function results in parport, serial, & video drivers.
drivers/parport/parport_serial.c:402: warning: ignoring return value of 'pci_enable_device', declared with attribute warn_unused_result drivers/serial/8250_pci.c:1826: warning: ignoring return value of 'pci_enable_device', declared with attribute warn_unused_result drivers/video/s3fb.c:1078: warning: ignoring return value of 'pci_enable_device', declared with attribute warn_unused_result Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]> --- drivers/parport/parport_serial.c | 8 +++++++- drivers/serial/8250_pci.c | 10 +++++++++- drivers/video/s3fb.c | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) --- linux-2.6.21-rc5-mm4.orig/drivers/parport/parport_serial.c +++ linux-2.6.21-rc5-mm4/drivers/parport/parport_serial.c @@ -392,6 +392,7 @@ static int parport_serial_pci_suspend(st static int parport_serial_pci_resume(struct pci_dev *dev) { struct parport_serial_private *priv = pci_get_drvdata(dev); + int err; pci_set_power_state(dev, PCI_D0); pci_restore_state(dev); @@ -399,7 +400,12 @@ static int parport_serial_pci_resume(str /* * The device may have been disabled. Re-enable it. */ - pci_enable_device(dev); + err = pci_enable_device(dev); + if (err) { + printk(KERN_ERR "parport_serial: %s: error enabling " + "device for resume (%d)\n", pci_name(dev), err); + return err; + } if (priv->serial) pciserial_resume_ports(priv->serial); --- linux-2.6.21-rc5-mm4.orig/drivers/serial/8250_pci.c +++ linux-2.6.21-rc5-mm4/drivers/serial/8250_pci.c @@ -1820,10 +1820,18 @@ static int pciserial_resume_one(struct p pci_restore_state(dev); if (priv) { + int err; + /* * The device may have been disabled. Re-enable it. */ - pci_enable_device(dev); + err = pci_enable_device(dev); + if (err) { + printk(KERN_ERR "8250_pci: %s: error %d " + "enabling device for resume\n", + pci_name(dev), err); + return err; + } pciserial_resume_ports(priv); } --- linux-2.6.21-rc5-mm4.orig/drivers/video/s3fb.c +++ linux-2.6.21-rc5-mm4/drivers/video/s3fb.c @@ -1061,6 +1061,7 @@ static int s3_pci_resume(struct pci_dev* { struct fb_info *info = pci_get_drvdata(dev); struct s3fb_info *par = info->par; + int err; dev_info(&(dev->dev), "resume\n"); @@ -1075,7 +1076,13 @@ static int s3_pci_resume(struct pci_dev* pci_set_power_state(dev, PCI_D0); pci_restore_state(dev); - pci_enable_device(dev); + err = pci_enable_device(dev); + if (err) { + mutex_unlock(&(par->open_lock)); + release_console_sem(); + dev_err(&(dev->dev), "error %d enabling device for resume\n", err); + return err; + } pci_set_master(dev); s3fb_set_par(info); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/