Commit 584e8deb authored by Axel Lin's avatar Axel Lin Committed by Greg Kroah-Hartman

hwmon: (jz4740) fix signedness bug

commit 0b57d760 upstream.

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 avatarGuenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 55f8ec62
......@@ -59,7 +59,7 @@ static ssize_t jz4740_hwmon_read_adcin(struct device *dev,
{
struct jz4740_hwmon *hwmon = dev_get_drvdata(dev);
struct completion *completion = &hwmon->read_completion;
unsigned long t;
long t;
unsigned long val;
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