diff options
author | Axel Lin <axel.lin@ingics.com> | 2012-11-16 04:09:22 -0500 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-11-16 04:46:42 -0500 |
commit | a5af092245a33965a4b089e8ba489c2db0f7db16 (patch) | |
tree | 11cf8e6b361616298cf42a0d8f31efa6eaab6dc3 /drivers/power/generic-adc-battery.c | |
parent | 77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff) |
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 <axel.lin@ingics.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power/generic-adc-battery.c')
-rw-r--r-- | drivers/power/generic-adc-battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c index 9bdf44470396..4a00ef7a8795 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) | |||
327 | ret = request_any_context_irq(irq, gab_charged, | 327 | ret = request_any_context_irq(irq, gab_charged, |
328 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | 328 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
329 | "battery charged", adc_bat); | 329 | "battery charged", adc_bat); |
330 | if (ret) | 330 | if (ret < 0) |
331 | goto err_gpio; | 331 | goto err_gpio; |
332 | } | 332 | } |
333 | 333 | ||