Skip to content

Commit 704fdc5

Browse files
dhananjay-AMDgregkh
authored andcommitted
cpufreq/amd-pstate: Remove the goto label in amd_pstate_update_limits
commit d364eee upstream. 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: Greg Kroah-Hartman <[email protected]>
1 parent e5aeac7 commit 704fdc5

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
@@ -796,8 +796,10 @@ static void amd_pstate_update_limits(unsigned int cpu)
796796
guard(mutex)(&amd_pstate_driver_lock);
797797

798798
ret = amd_get_highest_perf(cpu, &cur_high);
799-
if (ret)
800-
goto free_cpufreq_put;
799+
if (ret) {
800+
cpufreq_cpu_put(policy);
801+
return;
802+
}
801803

802804
prev_high = READ_ONCE(cpudata->prefcore_ranking);
803805
highest_perf_changed = (prev_high != cur_high);
@@ -807,8 +809,6 @@ static void amd_pstate_update_limits(unsigned int cpu)
807809
if (cur_high < CPPC_MAX_PERF)
808810
sched_set_itmt_core_prio((int)cur_high, cpu);
809811
}
810-
811-
free_cpufreq_put:
812812
cpufreq_cpu_put(policy);
813813

814814
if (!highest_perf_changed)

0 commit comments

Comments
 (0)