linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial/8250_pci: Fix a warning in pciserial_resume_one
@ 2007-10-24 10:17 Jean Delvare
  0 siblings, 0 replies; only message in thread
From: Jean Delvare @ 2007-10-24 10:17 UTC (permalink / raw)
  To: linux-serial

Fix the following warning:
drivers/serial/8250_pci.c: In function "pciserial_resume_one":
drivers/serial/8250_pci.c:1998: warning: ignoring return value of "pci_enable_device", declared with attribute warn_unused_result

Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
As a side note, I'm curious why the call to pci_enable_device() is
conditioned by priv being set. I'm also not sure if additional cleanups
should be performed if an error occurs.

 drivers/serial/8250_pci.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- linux-2.6.24-rc1.orig/drivers/serial/8250_pci.c	2007-10-24 09:59:47.000000000 +0200
+++ linux-2.6.24-rc1/drivers/serial/8250_pci.c	2007-10-24 12:03:26.000000000 +0200
@@ -1987,6 +1987,7 @@ static int pciserial_suspend_one(struct 
 static int pciserial_resume_one(struct pci_dev *dev)
 {
 	struct serial_private *priv = pci_get_drvdata(dev);
+	int rc;
 
 	pci_set_power_state(dev, PCI_D0);
 	pci_restore_state(dev);
@@ -1995,7 +1996,9 @@ static int pciserial_resume_one(struct p
 		/*
 		 * The device may have been disabled.  Re-enable it.
 		 */
-		pci_enable_device(dev);
+		rc = pci_enable_device(dev);
+		if (rc)
+			return rc;
 
 		pciserial_resume_ports(priv);
 	}


-- 
Jean Delvare

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

only message in thread, other threads:[~2007-10-24 10:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 10:17 [PATCH] serial/8250_pci: Fix a warning in pciserial_resume_one Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).