提交 e3da1cbe 编写于 作者: S Shawn Lin 提交者: Zhang Rui

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: NShawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: NChanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: NZhang Rui <rui.zhang@intel.com>
上级 d4b23c5c
...@@ -312,7 +312,7 @@ static int devfreq_cooling_state2power(struct thermal_cooling_device *cdev, ...@@ -312,7 +312,7 @@ static int devfreq_cooling_state2power(struct thermal_cooling_device *cdev,
unsigned long freq; unsigned long freq;
u32 static_power; u32 static_power;
if (state < 0 || state >= dfc->freq_table_size) if (state >= dfc->freq_table_size)
return -EINVAL; return -EINVAL;
freq = dfc->freq_table[state]; freq = dfc->freq_table[state];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册