[PATCH] cpufreq: exynos: free memory immediately on unknown SoC

Viresh Kumar viresh.kumar at linaro.org
Mon Aug 18 00:59:53 PDT 2014


On 17 August 2014 09:36, Arjun Sreedharan <arjun024 at gmail.com> wrote:
> Signed-off-by: Arjun Sreedharan <arjun024 at gmail.com>
> ---
>  drivers/cpufreq/exynos-cpufreq.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
> index 1e0ec57..e47d165 100644
> --- a/drivers/cpufreq/exynos-cpufreq.c
> +++ b/drivers/cpufreq/exynos-cpufreq.c
> @@ -178,6 +178,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
>                 ret = exynos5250_cpufreq_init(exynos_info);
>         } else {
>                 pr_err("%s: Unknown SoC type\n", __func__);
> +               kfree(exynos_info);
>                 return -ENODEV;
>         }

Apart from the fact that we could have added some logs and improved
$subject a bit,
it looks fine.

Acked-by: Viresh Kumar <viresh.kumar at linaro.org>



More information about the linux-arm-kernel mailing list