Thread (2 messages) flat view 2 messages, 2 authors, 2021-08-18
STALE1826d LANDED

Landed in mainline as c00103abf76f on 2021-08-10.

[PATCH] powerpc/kexec: fix for_each_child.cocci warning

From: Julia Lawall <julia.lawall@inria.fr>
Date: 2021-08-03 15:00:07
Also in: lkml, oe-kbuild-all

From: kernel test robot <redacted>

for_each_node_by_type should have of_node_put() before return.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

CC: Sumera Priyadarsini <redacted>
Reported-by: kernel test robot <redacted>
Signed-off-by: kernel test robot <redacted>
---

The code seems to have been this way since the beginning of time.  Perhaps
the of_node_put is a no op for this code?

 core_64.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--- a/arch/powerpc/kexec/core_64.c
+++ b/arch/powerpc/kexec/core_64.c
@@ -64,8 +64,10 @@ int default_machine_kexec_prepare(struct
 			begin = image->segment[i].mem;
 			end = begin + image->segment[i].memsz;

-			if ((begin < high) && (end > low))
+			if ((begin < high) && (end > low)) {
+				of_node_put(node);
 				return -ETXTBSY;
+			}
 		}
 	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help