Skip to content
Commit 03f44ffb authored by Tero Kristo's avatar Tero Kristo Committed by Rafael J. Wysocki
Browse files

cpufreq: intel_pstate: Fix energy_performance_preference for passive



If the intel_pstate driver is set to passive mode, then writing the
same value to the energy_performance_preference sysfs twice will fail.
This is caused by the wrong return value used (index of the matched
energy_perf_string), instead of the length of the passed in parameter.
Fix by forcing the internal return value to zero when the same
preference is passed in by user. This same issue is not present when
active mode is used for the driver.

Fixes: f6ebbcf0 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled")
Reported-by: default avatarNiklas Neronin <niklas.neronin@intel.com>
Signed-off-by: default avatarTero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c88ad30e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment