From: Lars-Peter Clausen <lars@metafoo.de>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org, Anton Vorontsov <cbouatmailru@gmail.com>
Subject: Re: [PATCH] power: gpio-charger: Fix checking return value of request_any_context_irq
Date: Mon, 04 Jul 2011 12:13:36 +0200 [thread overview]
Message-ID: <4E119250.8090009@metafoo.de> (raw)
In-Reply-To: <1309773855.2267.1.camel@phoenix>
On 07/04/2011 12:04 PM, Axel Lin wrote:
> request_any_context_irq() returns a negative value on failure.
> On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks
> ---
> drivers/power/gpio-charger.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
> index 718f2c5..a64b885 100644
> --- a/drivers/power/gpio-charger.c
> +++ b/drivers/power/gpio-charger.c
> @@ -127,7 +127,7 @@ static int __devinit gpio_charger_probe(struct platform_device *pdev)
> ret = request_any_context_irq(irq, gpio_charger_irq,
> IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
> dev_name(&pdev->dev), charger);
> - if (ret)
> + if (ret < 0)
> dev_warn(&pdev->dev, "Failed to request irq: %d\n", ret);
> else
> gpio_charger->irq = irq;
next prev parent reply other threads:[~2011-07-04 10:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-04 10:04 [PATCH] power: gpio-charger: Fix checking return value of request_any_context_irq Axel Lin
2011-07-04 10:13 ` Lars-Peter Clausen [this message]
2011-07-08 13:19 ` Anton Vorontsov
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=4E119250.8090009@metafoo.de \
--to=lars@metafoo.de \
--cc=axel.lin@gmail.com \
--cc=cbouatmailru@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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