Skip to content

Commit c7116af

Browse files
committed
cpufreq/amd-pstate: Remove the goto label in amd_pstate_update_limits
JIRA: https://issues.redhat.com/browse/RHEL-75923 commit d364eee Author: Dhananjay Ugwekar <[email protected]> Date: Wed Feb 5 11:25:12 2025 +0000 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 <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: David Arcari <[email protected]>
1 parent c1fe9f6 commit c7116af

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)