Re: [patch] cpufreq: s3c2416: double free on driver init error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07-02-17, 16:19, Dan Carpenter wrote:
> 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@xxxxxxxxxx>
> 
> 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;
>  	}

Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux