Message ID | alpine.DEB.2.22.394.2108031654080.17639@hadrien (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | powerpc/kexec: fix for_each_child.cocci warning | expand |
On Tue, 3 Aug 2021 16:59:55 +0200 (CEST), Julia Lawall wrote: > for_each_node_by_type should have of_node_put() before return. > > Generated by: scripts/coccinelle/iterators/for_each_child.cocci Applied to powerpc/next. [1/1] powerpc/kexec: fix for_each_child.cocci warning https://git.kernel.org/powerpc/c/c00103abf76fd3916596afd07dd3fdeee0dca15d cheers
--- 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; + } } }