mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
parent
77b67063bb
commit
a5af092245
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue