> @@ -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

Reply via email to