mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[CPUFREQ] powernow-k8: Don't try to transition if the pstate is incorrect
This patch augments the pstate transition code to error out (instead of returning 0) when an incorrect pstate is provided. Suggested-by: Borislav Petkov <[email protected]> CC: [email protected] CC: [email protected] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Dave Jones <[email protected]>
This commit is contained in:
parent
a9d3d20680
commit
fbb5b89eab
1 changed files with 2 additions and 1 deletions
|
|
@ -1104,7 +1104,8 @@ static int transition_frequency_pstate(struct powernow_k8_data *data,
|
|||
/* get MSR index for hardware pstate transition */
|
||||
pstate = index & HW_PSTATE_MASK;
|
||||
if (pstate > data->max_hw_pstate)
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
|
||||
freqs.old = find_khz_freq_from_pstate(data->powernow_table,
|
||||
data->currpstate);
|
||||
freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate);
|
||||
|
|
|
|||
Loading…
Reference in a new issue