projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2749896
)
mips: cpc: Fix refcount leak in mips_cpc_default_phys_base
author
Gong Yuanjun
<ruc_gongyuanjun@163.com>
Thu, 7 Apr 2022 04:26:57 +0000
(12:26 +0800)
committer
Thomas Bogendoerfer
<tsbogend@alpha.franken.de>
Tue, 26 Apr 2022 13:11:25 +0000
(15:11 +0200)
Add the missing of_node_put() to release the refcount incremented
by of_find_compatible_node().
Signed-off-by: Gong Yuanjun <ruc_gongyuanjun@163.com>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/mips-cpc.c
patch
|
blob
|
history
diff --git
a/arch/mips/kernel/mips-cpc.c
b/arch/mips/kernel/mips-cpc.c
index 17aff13cd7ce6ea78d0e6be2d944e7ce4208f9f1..3e386f7e154507c527a64c98da861b548b7c67f1 100644
(file)
--- a/
arch/mips/kernel/mips-cpc.c
+++ b/
arch/mips/kernel/mips-cpc.c
@@
-28,6
+28,7
@@
phys_addr_t __weak mips_cpc_default_phys_base(void)
cpc_node = of_find_compatible_node(of_root, NULL, "mti,mips-cpc");
if (cpc_node) {
err = of_address_to_resource(cpc_node, 0, &res);
+ of_node_put(cpc_node);
if (!err)
return res.start;
}