From: Dave Hansen <dave@sr71.net>
To: dave@sr71.net
Cc: linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
Javier Martinez Canillas <martinez.javier@gmail.com>
Subject: [PATCH] leds-ss4200: Check pci_enable_device return
Date: Wed, 14 Oct 2009 09:20:47 -0700 [thread overview]
Message-ID: <1255537247-17208-1-git-send-email-dave@sr71.net> (raw)
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
next reply other threads:[~2009-10-14 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 16:20 Dave Hansen [this message]
2009-11-06 16:14 ` [PATCH] leds-ss4200: Check pci_enable_device return Richard Purdie
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=1255537247-17208-1-git-send-email-dave@sr71.net \
--to=dave@sr71.net \
--cc=linux-kernel@vger.kernel.org \
--cc=martinez.javier@gmail.com \
--cc=rpurdie@rpsys.net \
/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