cpufreq: s3c2416: double free on driver init error path
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 7 Feb 2017 13:19:06 +0000 (16:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:40:30 +0000 (14:40 +0200)
commit8a6f400a374c2366ae2e0a3e528a2c9791b1dcd1
treed14bff6370c31769ad4bec1b9a6771d9937ce9a6
parent1781a29b31faee2cae9e7f353d8ab99ceb619c15
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>
drivers/cpufreq/s3c2416-cpufreq.c