From a5af092245a33965a4b089e8ba489c2db0f7db16 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 16 Nov 2012 17:09:22 +0800 Subject: 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 Signed-off-by: Anton Vorontsov --- drivers/power/generic-adc-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/power') diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c index 9bdf4447039..4a00ef7a879 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; } -- cgit v1.2.3-70-g09d2