The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] leds-ss4200: Check pci_enable_device return
@ 2009-10-14 16:20 Dave Hansen
  2009-11-06 16:14 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Hansen @ 2009-10-14 16:20 UTC (permalink / raw)
  To: dave; +Cc: linux-kernel, Richard Purdie, Javier Martinez Canillas

pci_enable_result is defined using the __must_check macro but
leds-ss4200 is not checking the return value.

Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Dave Hansen <dave@sr71.net>
---
 drivers/leds/leds-ss4200.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c
index 0ec4ec3..c7f6347 100644
--- a/drivers/leds/leds-ss4200.c
+++ b/drivers/leds/leds-ss4200.c
@@ -344,10 +344,14 @@ static struct pci_dev *nas_gpio_pci_dev;
 static int __devinit ich7_lpc_probe(struct pci_dev *dev,
 				    const struct pci_device_id *id)
 {
-	int status = 0;
+	int status;
 	u32 gc = 0;
 
-	pci_enable_device(dev);
+	status = pci_enable_device(dev);
+	if (status) {
+		dev_err(&dev->dev, "pci_enable_device failed\n");
+		return;
+	}
 
 	nas_gpio_pci_dev = dev;
 	status = pci_read_config_dword(dev, PMBASE, &g_pm_io_base);
-- 
1.6.5.rc2


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

* Re: [PATCH] leds-ss4200: Check pci_enable_device return
  2009-10-14 16:20 [PATCH] leds-ss4200: Check pci_enable_device return Dave Hansen
@ 2009-11-06 16:14 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2009-11-06 16:14 UTC (permalink / raw)
  To: Dave Hansen; +Cc: linux-kernel, Javier Martinez Canillas

On Wed, 2009-10-14 at 09:20 -0700, Dave Hansen wrote:
> pci_enable_result is defined using the __must_check macro but
> leds-ss4200 is not checking the return value.
> 
> Cc: Richard Purdie <rpurdie@rpsys.net>
> Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
> Signed-off-by: Dave Hansen <dave@sr71.net>
> ---
>  drivers/leds/leds-ss4200.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)

Queued in the LED tree, thanks.

Richard


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

end of thread, other threads:[~2009-11-07 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14 16:20 [PATCH] leds-ss4200: Check pci_enable_device return Dave Hansen
2009-11-06 16:14 ` Richard Purdie

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