Commit c00103ab authored by kernel test robot's avatar kernel test robot Committed by Michael Ellerman

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: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2108031654080.17639@hadrien
parent bd1dd4c5
......@@ -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;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment