pciserial_resume_one() should check the return value of pci_enable_device()
PATCH 1/1 pciserial_resume_one() should check the return value of pci_enable_device()
While compiling Linus' tree this morning, I noticed the following warning, which I believe that the patch below resolves. Of course this assumes that callers of pci_enable_device check its return value, I haven't verified this.
warning: ignoring return value of `pci_enable_device', declared with attribute warn_unused_result
Signed-off-by Simon Horman <[email protected]>
drivers/serial/8250_pci.c +4 -1
@@ -1819,6 +1819,7 @@static int pciserial_resume_one (struct pci_dev *dev) {struct serial_private *priv =pci_get_drvdata (dev); +int err;pci_set_power_state (dev,PCI_D0 );pci_restore_state (dev);
@@ -1827,7 +1828,9 @@/* * The device may have been disabled. Re-enable it. */ -pci_enable_device (dev); + err =pci_enable_device (dev); +if (err <0 ) +return err;pciserial_resume_ports (priv); }