Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;