[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4908D067.9080207@gmail.com>
Date: Wed, 29 Oct 2008 17:06:47 -0400
From: roel kluin <roel.kluin@...il.com>
To: len.brown@...el.com
CC: linux-kernel@...r.kernel.org
Subject: [PATCH] intel_menlo: max_state is unsigned, invalid test
max_state is unsigned, so the test is invalid.
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
I think max_state can only become -1, no? then probably a different
patch is required.
I may not be able to respond for a few weeks.
diff --git a/drivers/misc/intel_menlow.c b/drivers/misc/intel_menlow.c
index e00a275..980171d 100644
--- a/drivers/misc/intel_menlow.c
+++ b/drivers/misc/intel_menlow.c
@@ -121,7 +121,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
if (memory_get_int_max_bandwidth(cdev, &max_state))
return -EFAULT;
- if (max_state < 0 || state > max_state)
+ if (max_state == -1 || state > max_state)
return -EINVAL;
arg_list.count = 1;
--
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