mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
mips: cdmm: Fix refcount leak in mips_cdmm_phys_base
[ Upstream commit4528668ca3
] The of_find_compatible_node() function returns a node pointer with refcount incremented, We should use of_node_put() on it when done Add the missing of_node_put() to release the refcount. Fixes:2121aa3e23
("mips: cdmm: Add mti,mips-cdmm dtb node support") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Acked-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
406ee04387
commit
4e38888799
1 changed files with 1 additions and 0 deletions
|
@ -351,6 +351,7 @@ phys_addr_t __weak mips_cdmm_phys_base(void)
|
|||
np = of_find_compatible_node(NULL, NULL, "mti,mips-cdmm");
|
||||
if (np) {
|
||||
err = of_address_to_resource(np, 0, &res);
|
||||
of_node_put(np);
|
||||
if (!err)
|
||||
return res.start;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue