Thread (15 messages) 15 messages, 5 authors, 2015-10-12

[PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put

From: Thomas Petazzoni <hidden>
Date: 2015-10-12 07:29:16
Also in: kernel-janitors, linux-sh, lkml

Dear Geert Uytterhoeven,

On Mon, 12 Oct 2015 09:18:52 +0200, Geert Uytterhoeven wrote:
quoted
                pd = kzalloc(sizeof(*pd), GFP_KERNEL);
-               if (!pd)
+               if (!pd) {
+                       of_node_put(np);
                        return -ENOMEM;
+               }
While technically this patch is correct, the system will be dead anyway if it
ever goes OOM at core_initcall() time.
Then BUG_ON(!pd); ?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help