lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E119250.8090009@metafoo.de>
Date:	Mon, 04 Jul 2011 12:13:36 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Axel Lin <axel.lin@...il.com>
CC:	linux-kernel@...r.kernel.org,
	Anton Vorontsov <cbouatmailru@...il.com>
Subject: Re: [PATCH] power: gpio-charger: Fix checking return value of request_any_context_irq

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@...il.com>

Acked-by: Lars-Peter Clausen <lars@...afoo.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;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ