[<prev] [next>] [day] [month] [year] [list]
Message-ID: <488529E3.3020609@gmail.com>
Date: Mon, 21 Jul 2008 20:29:23 -0400
From: roel kluin <roel.kluin@...il.com>
To: colin@...ino.net
CC: linux-kernel@...r.kernel.org
Subject: [PATCH 5/9] adt746x: test below 0 on unsigned val
val is unsigned so the test doesn't work.
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index 22bf981..f574077 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -500,7 +500,7 @@ static ssize_t store_##name(struct device *dev, struct device_attribute *attr, c
{ \
u32 val; \
val = simple_strtoul(buf, NULL, 10); \
- if (val < 0 || val > 255) \
+ if (val > 255) \
return -EINVAL; \
printk(KERN_INFO "Setting specified fan speed to %d\n", val); \
data = val; \
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists