mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
cpufreq: scmi: Fix cleanup path when boost enablement fails
Include free_cpufreq_table in the cleanup path when boost enablement fails.
cc: stable@vger.kernel.org
Fixes: a8e949d41c
("cpufreq: scmi: Enable boost support")
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
parent
1a1374bb8c
commit
8c776a54d9
@ -287,7 +287,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
|
||||
ret = cpufreq_enable_boost_support();
|
||||
if (ret) {
|
||||
dev_warn(cpu_dev, "failed to enable boost: %d\n", ret);
|
||||
goto out_free_opp;
|
||||
goto out_free_table;
|
||||
} else {
|
||||
scmi_cpufreq_hw_attr[1] = &cpufreq_freq_attr_scaling_boost_freqs;
|
||||
scmi_cpufreq_driver.boost_enabled = true;
|
||||
@ -296,6 +296,8 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
|
||||
|
||||
return 0;
|
||||
|
||||
out_free_table:
|
||||
dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
|
||||
out_free_opp:
|
||||
dev_pm_opp_remove_all_dynamic(cpu_dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user