linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mips/kernel: Add missing of_node_get()
@ 2022-06-22  6:08 Liang He
  2022-06-22  6:56 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Liang He @ 2022-06-22  6:08 UTC (permalink / raw)
  To: tsbogend, geert+renesas, linux-mips, windhl

In mips_cpc_default_phys_base(), we need to add of_node_get() before
of_find_compatible_node() which will decrease the refcount of its
first arg.

Signed-off-by: Liang He <windhl@126.com>
---
 arch/mips/kernel/mips-cpc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/kernel/mips-cpc.c b/arch/mips/kernel/mips-cpc.c
index 3e386f7e1545..7ba0ae5df882 100644
--- a/arch/mips/kernel/mips-cpc.c
+++ b/arch/mips/kernel/mips-cpc.c
@@ -25,6 +25,7 @@ phys_addr_t __weak mips_cpc_default_phys_base(void)
 	struct resource res;
 	int err;
 
+	of_node_get(of_root);
 	cpc_node = of_find_compatible_node(of_root, NULL, "mti,mips-cpc");
 	if (cpc_node) {
 		err = of_address_to_resource(cpc_node, 0, &res);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-22  7:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-22  6:08 [PATCH] mips/kernel: Add missing of_node_get() Liang He
2022-06-22  6:56 ` Geert Uytterhoeven
2022-06-22  7:12   ` Liang He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).