提交 ef7906f3 编写于 作者: A Axel Lin 提交者: Anton Vorontsov

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: NAxel Lin <axel.lin@gmail.com>
Acked-by: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
上级 2530daa1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册