[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4AD8769E.4060702@gmail.com>
Date: Fri, 16 Oct 2009 15:35:26 +0200
From: Roel Kluin <roel.kluin@...il.com>
To: len.brown@...el.com, rui.zhang@...el.com,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] thermal: Fix check of unsigned in thermal_cooling_device_cur_state_store()
state is unsigned long so the test does not work.
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
Is this the right fix? please review.
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 4e83c29..04970bf 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -374,7 +374,7 @@ thermal_cooling_device_cur_state_store(struct device *dev,
if (!sscanf(buf, "%ld\n", &state))
return -EINVAL;
- if (state < 0)
+ if ((long)state < 0)
return -EINVAL;
result = cdev->ops->set_cur_state(cdev, state);
--
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