mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
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: 44a01f1f72
("LoongArch: Parsing CPU-related information from DTS")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
parent
4103cfe9dc
commit
2e3bc71e4f
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue