From 09a46db05b2e07484c08c638d7d6bda0523a13a6 Mon Sep 17 00:00:00 2001 From: Dave Hansen Date: Wed, 14 Oct 2009 09:20:47 -0700 Subject: leds-ss4200: Check pci_enable_device return pci_enable_result is defined using the __must_check macro but leds-ss4200 is not checking the return value. Signed-off-by: Javier Martinez Canillas Signed-off-by: Dave Hansen Signed-off-by: Richard Purdie --- drivers/leds/leds-ss4200.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/leds') diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c index 0ec4ec3bc82..c7f634727d6 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); -- cgit v1.2.3-70-g09d2