diff options
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 8b8677f92700..eb3fdc755000 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -366,12 +366,13 @@ static int intel_pstate_turbo_pstate(void) | |||
366 | static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max) | 366 | static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max) |
367 | { | 367 | { |
368 | int max_perf = cpu->pstate.turbo_pstate; | 368 | int max_perf = cpu->pstate.turbo_pstate; |
369 | int max_perf_adj; | ||
369 | int min_perf; | 370 | int min_perf; |
370 | if (limits.no_turbo) | 371 | if (limits.no_turbo) |
371 | max_perf = cpu->pstate.max_pstate; | 372 | max_perf = cpu->pstate.max_pstate; |
372 | 373 | ||
373 | max_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.max_perf)); | 374 | max_perf_adj = fp_toint(mul_fp(int_tofp(max_perf), limits.max_perf)); |
374 | *max = clamp_t(int, max_perf, | 375 | *max = clamp_t(int, max_perf_adj, |
375 | cpu->pstate.min_pstate, cpu->pstate.turbo_pstate); | 376 | cpu->pstate.min_pstate, cpu->pstate.turbo_pstate); |
376 | 377 | ||
377 | min_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.min_perf)); | 378 | min_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.min_perf)); |