Content-Type: multipart/mixed; boundary="===============4189635316712363252==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] powerpc/kexec: fix for_each_child.cocci warning Date: Tue, 03 Aug 2021 16:59:55 +0200 Message-ID: List-Id: --===============4189635316712363252== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot for_each_node_by_type should have of_node_put() before return. Generated by: scripts/coccinelle/iterators/for_each_child.cocci CC: Sumera Priyadarsini Reported-by: kernel test robot Signed-off-by: kernel test robot --- 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 =3D image->segment[i].mem; end =3D begin + image->segment[i].memsz; - if ((begin < high) && (end > low)) + if ((begin < high) && (end > low)) { + of_node_put(node); return -ETXTBSY; + } } } --===============4189635316712363252==--