leds-ss4200: Check pci_enable_device return
PATCH 1/1 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.
Cc Richard Purdie <[email protected]>
Signed-off-by Javier Martinez Canillas <[email protected]>
Signed-off-by Dave Hansen <[email protected]>
--- drivers/leds/leds-ss4200.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
drivers/leds/leds-ss4200.c +6 -2
@@ -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);
Signature · 1 line
1.6.5.rc2
Richard Purdie
AppliedQuoted 9 lines · Dave Hansen
pci_enable_resultis defined using the__must_checkmacro but leds-ss4200 is not checking the return value.Cc Richard Purdie <[email protected]>Signed-off-by Javier Martinez Canillas <[email protected]>Signed-off-by Dave Hansen <[email protected]>--- drivers/leds/leds-ss4200.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Queued in the LED tree, thanks.
Richard