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

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

jz4740-battery: Fix signedness bug



wait_for_completion_interruptible_timeout() may return negative value.
In this case, checking if (t > 0)  will return true if t is unsigned.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent 2530daa1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static irqreturn_t jz_battery_irq_handler(int irq, void *devid)

static long jz_battery_read_voltage(struct jz_battery *battery)
{
	unsigned long t;
	long t;
	unsigned long val;
	long voltage;