RISC-V: add of_node_put()
authorYangtao Li <tiny.windzz@gmail.com>
Tue, 20 Nov 2018 14:11:02 +0000 (09:11 -0500)
committerPalmer Dabbelt <palmer@sifive.com>
Fri, 21 Dec 2018 16:11:08 +0000 (08:11 -0800)
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>
arch/riscv/kernel/time.c

index 1911c8f6b8a69668e7e787d8832fcfa2389a218a..40470e669a351ac937788c1e6841c7f3e77e1268 100644 (file)
@@ -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;