summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/amd-pstate.c
diff options
context:
space:
mode:
authorDhananjay Ugwekar <dhananjay.ugwekar@amd.com>2025-02-05 11:25:12 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 14:01:46 +0100
commit704fdc59601e5b3f455184e4a0b65fbdefe0f86d (patch)
tree0174fd951709ffeb2ac05adce4c2b0e5a4c4dbd8 /drivers/cpufreq/amd-pstate.c
parente5aeac73ab046c759f79cdecae882b9cb91badb9 (diff)
downloadlinux-704fdc59601e5b3f455184e4a0b65fbdefe0f86d.tar.gz
linux-704fdc59601e5b3f455184e4a0b65fbdefe0f86d.tar.bz2
linux-704fdc59601e5b3f455184e4a0b65fbdefe0f86d.zip
cpufreq/amd-pstate: Remove the goto label in amd_pstate_update_limits
commit d364eee14c682b141f4667efc3c65191339d88bd upstream. Scope based guard/cleanup macros should not be used together with goto labels. Hence, remove the goto label. Fixes: 6c093d5a5b73 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/cpufreq/amd-pstate.c')
-rw-r--r--drivers/cpufreq/amd-pstate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index bdfd8ffe0439..9db5354fdb02 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -796,8 +796,10 @@ static void amd_pstate_update_limits(unsigned int cpu)
guard(mutex)(&amd_pstate_driver_lock);
ret = amd_get_highest_perf(cpu, &cur_high);
- if (ret)
- goto free_cpufreq_put;
+ if (ret) {
+ cpufreq_cpu_put(policy);
+ return;
+ }
prev_high = READ_ONCE(cpudata->prefcore_ranking);
highest_perf_changed = (prev_high != cur_high);
@@ -807,8 +809,6 @@ static void amd_pstate_update_limits(unsigned int cpu)
if (cur_high < CPPC_MAX_PERF)
sched_set_itmt_core_prio((int)cur_high, cpu);
}
-
-free_cpufreq_put:
cpufreq_cpu_put(policy);
if (!highest_perf_changed)