summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-08-22 16:08:06 +0800
committerZhang Rui <rui.zhang@intel.com>2016-09-27 14:02:16 +0800
commite3da1cbed64a19babe91775e21fcd8887039e711 (patch)
tree4ccb47768b58cc8fa5aea9672fc959045d331345 /drivers/thermal
parentd4b23c5c434a7af053782cc0f9eebee51ec71bb2 (diff)
downloadlinux-e3da1cbed64a19babe91775e21fcd8887039e711.tar.bz2
devfreq_cooling: no need to check state with negative number
We could see that state is defined as unsigned type, so it should never be less than zero. Let' remove this check. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/devfreq_cooling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
index 01f0015f80dc..81631b110e17 100644
--- a/drivers/thermal/devfreq_cooling.c
+++ b/drivers/thermal/devfreq_cooling.c
@@ -312,7 +312,7 @@ static int devfreq_cooling_state2power(struct thermal_cooling_device *cdev,
unsigned long freq;
u32 static_power;
- if (state < 0 || state >= dfc->freq_table_size)
+ if (state >= dfc->freq_table_size)
return -EINVAL;
freq = dfc->freq_table[state];