mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
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: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
This commit is contained in:
parent
2530daa187
commit
ef7906f320
@ -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)
|
static long jz_battery_read_voltage(struct jz_battery *battery)
|
||||||
{
|
{
|
||||||
unsigned long t;
|
long t;
|
||||||
unsigned long val;
|
unsigned long val;
|
||||||
long voltage;
|
long voltage;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user