public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: add of_node_put()
@ 2018-11-20 14:11 Yangtao Li
  2018-11-20 17:29 ` Palmer Dabbelt
  0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2018-11-20 14:11 UTC (permalink / raw)
  To: palmer, aou, dmitriy, atish.patra, tglx
  Cc: linux-riscv, linux-kernel, Yangtao Li

use of_node_put() to release the refcount.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 arch/riscv/kernel/time.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c
index 1911c8f6b8a6..40470e669a35 100644
--- a/arch/riscv/kernel/time.c
+++ b/arch/riscv/kernel/time.c
@@ -26,6 +26,7 @@ void __init time_init(void)
 	cpu = of_find_node_by_path("/cpus");
 	if (!cpu || of_property_read_u32(cpu, "timebase-frequency", &prop))
 		panic(KERN_WARNING "RISC-V system with no 'timebase-frequency' in DTS\n");
+	of_node_put(cpu);
 	riscv_timebase = prop;
 
 	lpj_fine = riscv_timebase / HZ;
-- 
2.17.0


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

end of thread, other threads:[~2018-11-20 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-20 14:11 [PATCH] RISC-V: add of_node_put() Yangtao Li
2018-11-20 17:29 ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox