summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-02-07 16:19:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-05 14:37:22 +0200
commit3491a0b59fcd933ee6dac6e1ed320d76f16e2311 (patch)
tree67417877f94b782fe405fedd7a6fadf662b8a30c /drivers/cpufreq
parentaad7041e721e2bb7aa7755d8ffca0fbc2ee1e17f (diff)
downloadlinux-stable-3491a0b59fcd933ee6dac6e1ed320d76f16e2311.tar.gz
linux-stable-3491a0b59fcd933ee6dac6e1ed320d76f16e2311.tar.bz2
linux-stable-3491a0b59fcd933ee6dac6e1ed320d76f16e2311.zip
cpufreq: s3c2416: double free on driver init error path
commit a69261e4470d680185a15f748d9cdafb37c57a33 upstream. The "goto err_armclk;" error path already does a clk_put(s3c_freq->hclk); so this is a double free. Fixes: 34ee55075265 ([CPUFREQ] Add S3C2416/S3C2450 cpufreq driver) Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/s3c2416-cpufreq.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c
index d6d425773fa4..5b2db3c6568f 100644
--- a/drivers/cpufreq/s3c2416-cpufreq.c
+++ b/drivers/cpufreq/s3c2416-cpufreq.c
@@ -400,7 +400,6 @@ static int s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
rate = clk_get_rate(s3c_freq->hclk);
if (rate < 133 * 1000 * 1000) {
pr_err("cpufreq: HCLK not at 133MHz\n");
- clk_put(s3c_freq->hclk);
ret = -EINVAL;
goto err_armclk;
}