summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-02-22 10:17:11 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-02-22 10:17:11 +0100
commit5b317cbf2bcb85a1e96ce87717cb991ecab1dd4d (patch)
tree2b1d7f270ec7374618e0903d73c795d7d7d0f7e6
parent74fb44863084275b952f21ec6a024af0e2e75cb8 (diff)
parent8cbd468bdeb5ed3acac2d7a9f7494d5b77e46297 (diff)
Merge branch 'pm-cpufreq-fixes'
* pm-cpufreq-fixes: cpufreq: scmi: Fix use-after-free in scmi_cpufreq_exit()
-rw-r--r--drivers/cpufreq/scmi-cpufreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 242c3370544e..9ed46d188cb5 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -187,8 +187,8 @@ static int scmi_cpufreq_exit(struct cpufreq_policy *policy)
cpufreq_cooling_unregister(priv->cdev);
dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table);
- kfree(priv);
dev_pm_opp_remove_all_dynamic(priv->cpu_dev);
+ kfree(priv);
return 0;
}