Commit 49243adc authored by Dhananjay Ugwekar's avatar Dhananjay Ugwekar Committed by Viresh Kumar

cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()

Fix the reference counting of cpufreq_policy object in amd_pstate_update()
function by adding the missing cpufreq_cpu_put().

Fixes: e8f555da ("cpufreq/amd-pstate: fix setting policy current frequency value")
Signed-off-by: default avatarDhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
Reviewed-by: default avatarPerry Yuan <perry.yuan@amd.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 81746019
...@@ -554,12 +554,15 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf, ...@@ -554,12 +554,15 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
} }
if (value == prev) if (value == prev)
return; goto cpufreq_policy_put;
WRITE_ONCE(cpudata->cppc_req_cached, value); WRITE_ONCE(cpudata->cppc_req_cached, value);
amd_pstate_update_perf(cpudata, min_perf, des_perf, amd_pstate_update_perf(cpudata, min_perf, des_perf,
max_perf, fast_switch); max_perf, fast_switch);
cpufreq_policy_put:
cpufreq_cpu_put(policy);
} }
static int amd_pstate_verify(struct cpufreq_policy_data *policy) static int amd_pstate_verify(struct cpufreq_policy_data *policy)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment