Commit 5c61d5c8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Sasha Levin

cpufreq: s3c2416: double free on driver init error path

[ Upstream commit a69261e4 ]

The "goto err_armclk;" error path already does a clk_put(s3c_freq->hclk);
so this is a double free.

Fixes: 34ee5507 ([CPUFREQ] Add S3C2416/S3C2450 cpufreq driver)
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 3b1062f6
...@@ -400,7 +400,6 @@ static int s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy) ...@@ -400,7 +400,6 @@ static int s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
rate = clk_get_rate(s3c_freq->hclk); rate = clk_get_rate(s3c_freq->hclk);
if (rate < 133 * 1000 * 1000) { if (rate < 133 * 1000 * 1000) {
pr_err("cpufreq: HCLK not at 133MHz\n"); pr_err("cpufreq: HCLK not at 133MHz\n");
clk_put(s3c_freq->hclk);
ret = -EINVAL; ret = -EINVAL;
goto err_armclk; goto err_armclk;
} }
......
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