power: generic-adc-battery: Fix checking return value of request_any_context_irq
PATCH RESEND 1/1 power: generic-adc-battery: Fix checking return value of request_any_context_irq
On failure, request_any_context_irq() returns a negative value. On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
---
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.
Regards,
Axel
drivers/power/generic-adc-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/generic-adc-battery.c +1 -1
@@ -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; }
Signature · 1 line
1.7.9.5
Quoted 8 lines · Axel Lin
On failure,
request_any_context_irq()returns a negative value. On success, it returns eitherIRQC_IS_HARDIRQorIRQC_IS_NESTED.Signed-off-by Axel Lin <[email protected]>---
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!
Quoted 20 lines
Regards,
Axeldrivers/power/generic-adc-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/generic-adc-battery.c +1
-1@@ -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; }Signature · 1 line
1.7.9.5