Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3da1cbe authored by Shawn Lin's avatar Shawn Lin Committed by Zhang Rui
Browse files

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: default avatarShawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent d4b23c5c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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];