Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH] serial: handle pci_enable_device() failure upon resume
@ 2006-10-12  1:47 Jeff Garzik
  2006-10-13  7:59 ` Russell King
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2006-10-12  1:47 UTC (permalink / raw)
  To: linux-serial, Andrew Morton, LKML



Signed-off-by: Jeff Garzik <jeff@garzik.org>

---

 drivers/serial/8250_pci.c    |    8 ++++++--

diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 4d0ff8f..aa96e94 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -1810,16 +1810,20 @@ static int pciserial_resume_one(struct p
 	pci_restore_state(dev);
 
 	if (priv) {
+		int rc;
+
 		/*
 		 * 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);
 	}
 	return 0;
 }
-#endif
+#endif /* CONFIG_PM */
 
 static struct pci_device_id serial_pci_tbl[] = {
 	{	PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-10-14  8:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-12  1:47 [PATCH] serial: handle pci_enable_device() failure upon resume Jeff Garzik
2006-10-13  7:59 ` Russell King
2006-10-13 20:15   ` Andrew Morton
2006-10-13 23:15     ` Alan Cox
2006-10-14  8:38     ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox