From: roel kluin <roel.kluin@gmail.com>
To: colin@colino.net
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 5/9] adt746x: test below 0 on unsigned val
Date: Mon, 21 Jul 2008 20:29:23 -0400 [thread overview]
Message-ID: <488529E3.3020609@gmail.com> (raw)
val is unsigned so the test doesn't work.
Signed-off-by: Roel Kluin <roel.kluin@gmail.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; \
reply other threads:[~2008-07-22 0:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=488529E3.3020609@gmail.com \
--to=roel.kluin@gmail.com \
--cc=colin@colino.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox