public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] hwmon: jz4740: fix signedness bug
@ 2011-12-08 13:04 Axel Lin
  2011-12-08 13:05 ` [PATCH 2/2] jz4740-battery: " Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Axel Lin @ 2011-12-08 13:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Lars-Peter Clausen, Jean Delvare, Guenter Roeck, lm-sensors

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 <axel.lin@gmail.com>
---
 drivers/hwmon/jz4740-hwmon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c
index 7a48b1e..3d7e590 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;
 
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-06  1:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08 13:04 [PATCH 1/2] hwmon: jz4740: fix signedness bug Axel Lin
2011-12-08 13:05 ` [PATCH 2/2] jz4740-battery: " Axel Lin
2011-12-08 14:08   ` Lars-Peter Clausen
2012-01-06  1:57     ` Anton Vorontsov
2011-12-08 14:08 ` [PATCH 1/2] hwmon: jz4740: " Lars-Peter Clausen
2011-12-08 14:20 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox