[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bc7c03e2-798f-7ccc-4386-227a9e16611d@web.de>
Date: Tue, 2 Apr 2019 15:54:27 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Wen Yang <wen.yang99@....com.cn>,
Gregory Clement <gregory.clement@...tlin.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
kernel-janitors@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>, Jason Cooper <jason@...edaemon.net>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, "Rafael J. Wysocki" <rjw@...ysocki.net>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Yi Wang <wang.yi59@....com.cn>
Subject: Re: [1/7] cpufreq: ap806: Checking implementation of
armada_8k_cpufreq_init()
> @@ -132,6 +132,7 @@ static int __init armada_8k_cpufreq_init(void)
> of_node_put(node);
> return -ENODEV;
> }
> + of_node_put(node);
>
> nb_cpus = num_possible_cpus();
> freq_tables = kcalloc(nb_cpus, sizeof(*freq_tables), GFP_KERNEL);
Would another null pointer check be safer for this memory allocation?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/cpufreq/armada-8k-cpufreq.c?id=05d08e2995cbe6efdb993482ee0d38a77040861a#n137
Regards,
Markus
Powered by blists - more mailing lists