From: Axel Lin Date: Thu, 8 Dec 2011 13:04:12 +0000 (-0500) Subject: hwmon: (jz4740) fix signedness bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0b57d7602b68f7b2786b2f0e22da39cbd4139a95;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Axel Lin Acked-by: Lars-Peter Clausen Cc: stable@kernel.org (3.0+) Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c index 7a48b1eb4233..3d7e590d57b7 100644 --- a/drivers/hwmon/jz4740-hwmon.c +++ b/drivers/hwmon/jz4740-hwmon.c @@ -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;