[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241031132745.3765612-2-quic_sibis@quicinc.com>
Date: Thu, 31 Oct 2024 18:57:44 +0530
From: Sibi Sankar <quic_sibis@...cinc.com>
To: <sudeep.holla@....com>, <cristian.marussi@....com>, <rafael@...nel.org>,
<viresh.kumar@...aro.org>, <morten.rasmussen@....com>,
<dietmar.eggemann@....com>, <lukasz.luba@....com>,
<pierre.gondois@....com>, <vincent.guittot@...aro.org>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-pm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <quic_mdtipton@...cinc.com>,
<linux-arm-msm@...r.kernel.org>, Sibi Sankar <quic_sibis@...cinc.com>,
<stable@...r.kernel.org>
Subject: [PATCH V7 1/2] cpufreq: scmi: Fix cleanup path when boost enablement fails
Include free_cpufreq_table in the cleanup path when boost enablement fails.
cc: stable@...r.kernel.org
Fixes: a8e949d41c72 ("cpufreq: scmi: Enable boost support")
Signed-off-by: Sibi Sankar <quic_sibis@...cinc.com>
---
drivers/cpufreq/scmi-cpufreq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 5892c73e129d..07d6f9a9b7c8 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -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);
--
2.34.1
Powered by blists - more mailing lists