Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5af0922 authored by Axel Lin's avatar Axel Lin Committed by Anton Vorontsov
Browse files

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: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
parent 77b67063
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}