[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1349943507.27003.0.camel@phoenix>
Date: Thu, 11 Oct 2012 16:18:27 +0800
From: Axel Lin <axel.lin@...ics.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Anton Vorontsov <cbou@...l.ru>,
anish kumar <anish198519851985@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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.
Signed-off-by: Axel Lin <axel.lin@...ics.com>
---
drivers/power/generic-adc-battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c
index 9bdf444..4a00ef7 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;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists