Skip to content

Commit b1793cd

Browse files
committed
Merge branch 'thermal-intel'
Merge an adjustment of the new Power Slider interface in the int340x thermal driver. * thermal-intel: thermal: intel: int340x: Power Slider: Validate slider_balance range
2 parents e3e6612 + 5cf952c commit b1793cd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ static int slider_def_balance_set(const char *arg, const struct kernel_param *kp
6767

6868
ret = kstrtou8(arg, 16, &slider_val);
6969
if (!ret) {
70-
if (slider_val > SOC_SLIDER_VALUE_MAXIMUM)
70+
if (slider_val <= slider_values[SOC_POWER_SLIDER_PERFORMANCE] ||
71+
slider_val >= slider_values[SOC_POWER_SLIDER_POWERSAVE])
7172
return -EINVAL;
7273

7374
slider_balanced_param = slider_val;

0 commit comments

Comments
 (0)