mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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>
This commit is contained in:
parent
d4b23c5c43
commit
e3da1cbed6
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue