We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5b955b commit 1075d43Copy full SHA for 1075d43
drivers/cpufreq/amd-pstate.c
@@ -821,20 +821,21 @@ static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata)
821
822
static void amd_pstate_update_limits(unsigned int cpu)
823
{
824
- struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
+ struct cpufreq_policy *policy = NULL;
825
struct amd_cpudata *cpudata;
826
u32 prev_high = 0, cur_high = 0;
827
int ret;
828
bool highest_perf_changed = false;
829
830
+ if (!amd_pstate_prefcore)
831
+ return;
832
+
833
+ policy = cpufreq_cpu_get(cpu);
834
if (!policy)
835
return;
836
837
cpudata = policy->driver_data;
838
- if (!amd_pstate_prefcore)
- return;
-
839
guard(mutex)(&amd_pstate_driver_lock);
840
841
ret = amd_get_highest_perf(cpu, &cur_high);
0 commit comments