mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-22 02:20:40 +00:00
mips: cpc: Fix refcount leak in mips_cpc_default_phys_base
[ Upstream commit 4107fa700f
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0a0539c524
commit
1699ec1bfb
1 changed files with 1 additions and 0 deletions
|
@ -27,6 +27,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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue