projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4103cfe
)
LoongArch: Fix device node refcount leak in fdt_cpu_clk_init()
author
Miaoqian Lin
<linmq006@gmail.com>
Sun, 30 Mar 2025 08:31:09 +0000
(16:31 +0800)
committer
Huacai Chen
<chenhuacai@loongson.cn>
Sun, 30 Mar 2025 08:31:09 +0000
(16:31 +0800)
Add missing of_node_put() to properly handle the reference count of the
device node obtained from of_get_cpu_node().
Fixes:
44a01f1f726a
("LoongArch: Parsing CPU-related information from DTS")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/env.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/loongarch/kernel/env.c
b/arch/loongarch/kernel/env.c
index 2f1f5b08638f818c2abb7a617b3b79250812b3b8..27144de5c5fe4f6159aa430f476c3d249af2aa2e 100644
(file)
--- a/
arch/loongarch/kernel/env.c
+++ b/
arch/loongarch/kernel/env.c
@@
-68,6
+68,8
@@
static int __init fdt_cpu_clk_init(void)
return -ENODEV;
clk = of_clk_get(np, 0);
+ of_node_put(np);
+
if (IS_ERR(clk))
return -ENODEV;