Skip to content

Commit 2e3bc71

Browse files
Yuuoniychenhuacai
authored andcommitted
LoongArch: Fix device node refcount leak in fdt_cpu_clk_init()
Add missing of_node_put() to properly handle the reference count of the device node obtained from of_get_cpu_node(). Fixes: 44a01f1 ("LoongArch: Parsing CPU-related information from DTS") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 4103cfe commit 2e3bc71

File tree

1 file changed

+2
-0
lines changed
  • arch/loongarch/kernel

1 file changed

+2
-0
lines changed

arch/loongarch/kernel/env.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ static int __init fdt_cpu_clk_init(void)
6868
return -ENODEV;
6969

7070
clk = of_clk_get(np, 0);
71+
of_node_put(np);
72+
7173
if (IS_ERR(clk))
7274
return -ENODEV;
7375

0 commit comments

Comments
 (0)