Decrement the reference count on device_node "node" while breaking out of the loop. Issue identified by Coccinelle.
Signed-off-by: Himadri Pandya <himadri18...@gmail.com> --- Changes in V2: - Change subject line --- arch/powerpc/kernel/machine_kexec_64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c index a0f6f45005bd..46edde582984 100644 --- a/arch/powerpc/kernel/machine_kexec_64.c +++ b/arch/powerpc/kernel/machine_kexec_64.c @@ -65,6 +65,7 @@ int default_machine_kexec_prepare(struct kimage *image) end = begin + image->segment[i].memsz; if ((begin < high) && (end > low)) + of_node_put(node); return -ETXTBSY; } } -- 2.17.1