aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kexec/file_load_64.c
diff options
context:
space:
mode:
authorWan Jiabing2021-10-17 21:54:16 -0400
committerMichael Ellerman2021-10-22 15:22:02 +1100
commit7453f501d443c7febf48809ee1c530b64d625c59 (patch)
treef52bce1003819799e522da232e0400b6624d01c6 /arch/powerpc/kexec/file_load_64.c
parent915b368f6968122fcab31fd6441ed4ba7cc7574c (diff)
powerpc/kexec_file: Add of_node_put() before goto
Fix following coccicheck warning: ./arch/powerpc/kexec/file_load_64.c:698:1-22: WARNING: Function for_each_node_by_type should have of_node_put() before goto Early exits from for_each_node_by_type should decrement the node reference counter. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Acked-by: Hari Bathini <hbathini@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211018015418.10182-1-wanjiabing@vivo.com
Diffstat (limited to 'arch/powerpc/kexec/file_load_64.c')
-rw-r--r--arch/powerpc/kexec/file_load_64.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c
index 5056e175ca2c..b4981b651d9a 100644
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -700,6 +700,7 @@ static int update_usable_mem_fdt(void *fdt, struct crash_mem *usable_mem)
if (ret) {
pr_err("Failed to set linux,usable-memory property for %s node",
dn->full_name);
+ of_node_put(dn);
goto out;
}
}