lkml.org 
[lkml]   [2019]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [1/7] cpufreq: ap806: Checking implementation of armada_8k_cpufreq_init()
From
Date
> @@ -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

\
 
 \ /
  Last update: 2019-04-02 15:55    [W:0.124 / U:1.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site