[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2108031654080.17639@hadrien>
Date: Tue, 3 Aug 2021 16:59:55 +0200 (CEST)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>
cc: linux-kernel@...r.kernel.org, kbuild-all@...ts.01.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
kbuild-all@...ts.01.org,
Sumera Priyadarsini <sylphrenadin@...il.com>
Subject: [PATCH] powerpc/kexec: fix for_each_child.cocci warning
From: kernel test robot <lkp@...el.com>
for_each_node_by_type should have of_node_put() before return.
Generated by: scripts/coccinelle/iterators/for_each_child.cocci
CC: Sumera Priyadarsini <sylphrenadin@...il.com>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
---
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;
+ }
}
}
Powered by blists - more mailing lists