Skip to content

Commit d364eee

Browse files
dhananjay-AMDsuperm1
authored andcommitted
cpufreq/amd-pstate: Remove the goto label in amd_pstate_update_limits
Scope based guard/cleanup macros should not be used together with goto labels. Hence, remove the goto label. Fixes: 6c093d5 ("cpufreq/amd-pstate: convert mutex use to guard()") Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20250205112523.201101-2-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
1 parent fa80351 commit d364eee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,10 @@ static void amd_pstate_update_limits(unsigned int cpu)
838838
guard(mutex)(&amd_pstate_driver_lock);
839839

840840
ret = amd_get_highest_perf(cpu, &cur_high);
841-
if (ret)
842-
goto free_cpufreq_put;
841+
if (ret) {
842+
cpufreq_cpu_put(policy);
843+
return;
844+
}
843845

844846
prev_high = READ_ONCE(cpudata->prefcore_ranking);
845847
highest_perf_changed = (prev_high != cur_high);
@@ -849,8 +851,6 @@ static void amd_pstate_update_limits(unsigned int cpu)
849851
if (cur_high < CPPC_MAX_PERF)
850852
sched_set_itmt_core_prio((int)cur_high, cpu);
851853
}
852-
853-
free_cpufreq_put:
854854
cpufreq_cpu_put(policy);
855855

856856
if (!highest_perf_changed)

0 commit comments

Comments
 (0)