summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2018-11-20 09:11:02 -0500
committerPalmer Dabbelt <palmer@sifive.com>2018-12-21 08:11:08 -0800
commitcd378dbb3dafbee16ef956d4101ede567f6ea2f7 (patch)
treee6204c6735d181c9ca62e1465ba851801db07703
parent94f9bf118f1e294b3f2092f8bde02860f5e3ea3f (diff)
downloadtalos-op-linux-cd378dbb3dafbee16ef956d4101ede567f6ea2f7.tar.gz
talos-op-linux-cd378dbb3dafbee16ef956d4101ede567f6ea2f7.zip
RISC-V: add of_node_put()
use of_node_put() to release the refcount. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
-rw-r--r--arch/riscv/kernel/time.c1
1 files changed, 1 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud