提交 a5af0922 编写于 作者: A Axel Lin 提交者: Anton Vorontsov

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: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
上级 77b67063
...@@ -327,7 +327,7 @@ static int __devinit gab_probe(struct platform_device *pdev) ...@@ -327,7 +327,7 @@ static int __devinit gab_probe(struct platform_device *pdev)
ret = request_any_context_irq(irq, gab_charged, ret = request_any_context_irq(irq, gab_charged,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
"battery charged", adc_bat); "battery charged", adc_bat);
if (ret) if (ret < 0)
goto err_gpio; goto err_gpio;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册