Re: [PATCH] pciserial_resume_one ignored return value of pci_enable_device

Previous thread: [PATCH] FRV: Move DMA macros to scatterlist.h for consistency. by Robert P. J. Day on Monday, October 29, 2007 - 9:25 am. (4 messages)

Next thread: [PATCH]: linux/interrupt.h doesn't need sched.h by Arnaldo Carvalho de Melo on Monday, October 29, 2007 - 9:45 am. (5 messages)
To: Greg KH <gregkh@...>, <linux-kernel@...>
Date: Monday, October 29, 2007 - 9:28 am

[PATCH] pciserial_resume_one ignored return value of pci_enable_device

Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com>

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

diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 0e35756..ceb03c9 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -1986,6 +1986,7 @@ static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)

static int pciserial_resume_one(struct pci_dev *dev)
{
+ int err;
struct serial_private *priv = pci_get_drvdata(dev);

pci_set_power_state(dev, PCI_D0);
@@ -1995,7 +1996,9 @@ static int pciserial_resume_one(struct pci_dev *dev)
/*
* The device may have been disabled. Re-enable it.
*/
- pci_enable_device(dev);
+ err = pci_enable_device(dev);
+ if (err)
+ return err;

pciserial_resume_ports(priv);
}
--
gitgui.0.8.4.g8d863

-

To: Dirk Hohndel <hohndel@...>
Cc: Greg KH <gregkh@...>, <linux-kernel@...>
Date: Monday, October 29, 2007 - 10:46 am

ACK

-

To: Dirk Hohndel <hohndel@...>
Cc: Greg KH <gregkh@...>, <linux-kernel@...>
Date: Monday, October 29, 2007 - 9:50 am

On Mon, 29 Oct 2007 06:28:17 -0700

Acked-by: Alan Cox <alan@redhat.com>

Not sure its worth the hassle but I guess someone could pull a hotplug
PCI serial card and then resume.
-

Previous thread: [PATCH] FRV: Move DMA macros to scatterlist.h for consistency. by Robert P. J. Day on Monday, October 29, 2007 - 9:25 am. (4 messages)

Next thread: [PATCH]: linux/interrupt.h doesn't need sched.h by Arnaldo Carvalho de Melo on Monday, October 29, 2007 - 9:45 am. (5 messages)