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] [day] [month] [year] [list]
Message-ID: <20121116094733.GA21792@lizard>
Date:	Fri, 16 Nov 2012 01:47:33 -0800
From:	Anton Vorontsov <cbouatmailru@...il.com>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Jonathan Cameron <jic23@...nel.org>,
	anish kumar <anish198519851985@...il.com>,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH RESEND] power: generic-adc-battery: Fix checking return
 value of request_any_context_irq

On Fri, Nov 16, 2012 at 05:09:22PM +0800, Axel Lin wrote:
> On failure, request_any_context_irq() returns a negative value.
> On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
> 
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
> This was sent on https://lkml.org/lkml/2012/10/11/77
> Nobody picks up this patch, so resend it.
> I think this patch is for 3.7.

Nah, the driver is new, plus I doubt that anyone actually registers it in
v3.7, and it's definitely not a regression.


The fix itself is a valid one though, I applied it to battery tree.

Thank you!

> Regards,
> Axel
>  drivers/power/generic-adc-battery.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c
> index 9bdf444..4a00ef7 100644
> --- a/drivers/power/generic-adc-battery.c
> +++ b/drivers/power/generic-adc-battery.c
> @@ -327,7 +327,7 @@ static int __devinit gab_probe(struct platform_device *pdev)
>  		ret = request_any_context_irq(irq, gab_charged,
>  				IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
>  				"battery charged", adc_bat);
> -		if (ret)
> +		if (ret < 0)
>  			goto err_gpio;
>  	}
>  
> -- 
> 1.7.9.5
--
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