All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pciserial_resume_one() should check the return value of pci_enable_device()
@ 2007-02-14  4:25 Simon Horman
  0 siblings, 0 replies; only message in thread
From: Simon Horman @ 2007-02-14  4:25 UTC (permalink / raw)
  To: linux-serial; +Cc: Andrew Morton

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 <horms@verge.net.au>

Index: linux-2.6/drivers/serial/8250_pci.c
===================================================================
--- linux-2.6.orig/drivers/serial/8250_pci.c	2007-02-14 13:05:59.000000000 +0900
+++ linux-2.6/drivers/serial/8250_pci.c	2007-02-14 13:06:07.000000000 +0900
@@ -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);
 	}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-14  4:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14  4:25 [PATCH] pciserial_resume_one() should check the return value of pci_enable_device() Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.