diff options
author | kernel test robot <lkp@intel.com> | 2021-08-03 17:59:55 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-08-10 16:14:55 +0300 |
commit | c00103abf76fd3916596afd07dd3fdeee0dca15d (patch) | |
tree | 0e81b28b89ae2434b1fea783d775aa6fa212b2e4 /arch/powerpc | |
parent | bd1dd4c5f5286df0148b5b316f37c583b8f55fa1 (diff) | |
download | linux-c00103abf76fd3916596afd07dd3fdeee0dca15d.tar.xz |
powerpc/kexec: fix for_each_child.cocci warning
for_each_node_by_type should have of_node_put() before return.
Generated by: scripts/coccinelle/iterators/for_each_child.cocci
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2108031654080.17639@hadrien
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kexec/core_64.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/kexec/core_64.c b/arch/powerpc/kexec/core_64.c index 84618d3c8013..89c069d664a5 100644 --- a/arch/powerpc/kexec/core_64.c +++ b/arch/powerpc/kexec/core_64.c @@ -64,8 +64,10 @@ int default_machine_kexec_prepare(struct kimage *image) 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; + } } } |