From: Jeff Garzik <jeff@garzik.org>
To: linux-serial@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] serial: handle pci_enable_device() failure upon resume
Date: Wed, 11 Oct 2006 21:47:20 -0400 [thread overview]
Message-ID: <20061012014720.GA12935@havoc.gtf.org> (raw)
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,
next reply other threads:[~2006-10-12 1:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 1:47 Jeff Garzik [this message]
2006-10-13 7:59 ` [PATCH] serial: handle pci_enable_device() failure upon resume Russell King
2006-10-13 20:15 ` Andrew Morton
2006-10-13 23:15 ` Alan Cox
2006-10-14 8:38 ` Russell King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061012014720.GA12935@havoc.gtf.org \
--to=jeff@garzik.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox