cpufreq: scmi: Fix use-after-free in scmi_cpufreq_exit()
authorYangtao Li <tiny.windzz@gmail.com>
Sat, 16 Feb 2019 16:31:48 +0000 (11:31 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Feb 2019 10:17:37 +0000 (11:17 +0100)
commit8cbd468bdeb5ed3acac2d7a9f7494d5b77e46297
tree734ce65303257279ceb01c26399df6cd2b236e49
parenta3b22b9f11d9fbc48b0291ea92259a5a810e9438
cpufreq: scmi: Fix use-after-free in scmi_cpufreq_exit()

This issue was detected with the help of Coccinelle. So
change the order of function calls to fix it.

Fixes: 1690d8bb91e37 (cpufreq: scpi/scmi: Fix freeing of dynamic OPPs)
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: 4.20+ <stable@vger.kernel.org> # 4.20+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/scmi-cpufreq.c