summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kexec
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2021-08-03 16:59:55 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-08-10 15:14:55 +0200
commitc00103abf76fd3916596afd07dd3fdeee0dca15d (patch)
tree0e81b28b89ae2434b1fea783d775aa6fa212b2e4 /arch/powerpc/kexec
parentpowerpc/pseries: Prevent free CPU ids being reused on another node (diff)
downloadlinux-c00103abf76fd3916596afd07dd3fdeee0dca15d.tar.xz
linux-c00103abf76fd3916596afd07dd3fdeee0dca15d.zip
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/kexec')
-rw-r--r--arch/powerpc/kexec/core_64.c4
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;
+ }
}
}