diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-12-08 08:05:26 -0500 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2012-01-05 20:57:17 -0500 |
commit | ef7906f3204280ccaf8cd7ace974b7c0a1393812 (patch) | |
tree | 125e5f8240ae635a3ff5665f8ad488c170de2228 /drivers/power | |
parent | 2530daa187be3adef2d7cb41bd51f1384e478f2b (diff) |
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>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/jz4740-battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c index 6b77029e6bdb..8dbc7bfaab14 100644 --- a/drivers/power/jz4740-battery.c +++ b/drivers/power/jz4740-battery.c | |||
@@ -67,7 +67,7 @@ static irqreturn_t jz_battery_irq_handler(int irq, void *devid) | |||
67 | 67 | ||
68 | static long jz_battery_read_voltage(struct jz_battery *battery) | 68 | static long jz_battery_read_voltage(struct jz_battery *battery) |
69 | { | 69 | { |
70 | unsigned long t; | 70 | long t; |
71 | unsigned long val; | 71 | unsigned long val; |
72 | long voltage; | 72 | long voltage; |
73 | 73 | ||