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>
This commit is contained in:
Yangtao Li 2018-11-20 09:11:02 -05:00 committed by Palmer Dabbelt
parent 94f9bf118f
commit cd378dbb3d
No known key found for this signature in database
GPG Key ID: EF4CA1502CCBAB41

View 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;