* [PATCH] power: generic-adc-battery: Fix checking return value of request_any_context_irq
@ 2012-10-11 8:18 Axel Lin
0 siblings, 0 replies; only message in thread
From: Axel Lin @ 2012-10-11 8:18 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: Anton Vorontsov, anish kumar, linux-kernel
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>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-11 8:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-11 8:18 [PATCH] power: generic-adc-battery: Fix checking return value of request_any_context_irq Axel Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox