From: akpm@linux-foundation.org
To: jeff@garzik.org
Cc: linux-ide@vger.kernel.org, akpm@linux-foundation.org,
roel.kluin@gmail.com, alan@lxorguk.ukuu.org.uk
Subject: [patch 1/1] pata-rb532-cf: platform_get_irq() failure ignored
Date: Wed, 04 Mar 2009 11:59:57 -0800 [thread overview]
Message-ID: <200903041959.n24Jxvvu028555@imap1.linux-foundation.org> (raw)
From: Roel Kluin <roel.kluin@gmail.com>
platform_get_irq() can return -ENXIO, but since 'irq' is an unsigned int,
it does not show when the IRQ resource wasn't found.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/ata/pata_rb532_cf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff -puN drivers/ata/pata_rb532_cf.c~pata-rb532-cf-platform_get_irq-failure-ignored drivers/ata/pata_rb532_cf.c
--- a/drivers/ata/pata_rb532_cf.c~pata-rb532-cf-platform_get_irq-failure-ignored
+++ a/drivers/ata/pata_rb532_cf.c
@@ -117,11 +117,12 @@ static __devinit int rb532_pata_driver_p
return -EINVAL;
}
- irq = platform_get_irq(pdev, 0);
- if (irq <= 0) {
+ ret = platform_get_irq(pdev, 0);
+ if (ret <= 0) {
dev_err(&pdev->dev, "no IRQ resource found\n");
return -ENOENT;
}
+ irq = ret;
gpio = irq_to_gpio(irq);
if (gpio < 0) {
_
next reply other threads:[~2009-03-04 20:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 19:59 akpm [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-05-12 20:44 [patch 1/1] pata-rb532-cf: platform_get_irq() failure ignored akpm
2009-05-12 21:17 ` Phil Sutter
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=200903041959.n24Jxvvu028555@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=roel.kluin@gmail.com \
/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