Commit 0b57d760 authored by Axel Lin's avatar Axel Lin Committed by Guenter Roeck

hwmon: (jz4740) 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>
Cc: stable@kernel.org (3.0+)
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent dc47ce90
...@@ -59,7 +59,7 @@ static ssize_t jz4740_hwmon_read_adcin(struct device *dev, ...@@ -59,7 +59,7 @@ static ssize_t jz4740_hwmon_read_adcin(struct device *dev,
{ {
struct jz4740_hwmon *hwmon = dev_get_drvdata(dev); struct jz4740_hwmon *hwmon = dev_get_drvdata(dev);
struct completion *completion = &hwmon->read_completion; struct completion *completion = &hwmon->read_completion;
unsigned long t; long t;
unsigned long val; unsigned long val;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment