Skip to content

Commit cd378db

Browse files
TinyWindzzpalmer-dabbelt
authored andcommitted
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>
1 parent 94f9bf1 commit cd378db

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/kernel/time.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ void __init time_init(void)
2626
cpu = of_find_node_by_path("/cpus");
2727
if (!cpu || of_property_read_u32(cpu, "timebase-frequency", &prop))
2828
panic(KERN_WARNING "RISC-V system with no 'timebase-frequency' in DTS\n");
29+
of_node_put(cpu);
2930
riscv_timebase = prop;
3031

3132
lpj_fine = riscv_timebase / HZ;

0 commit comments

Comments
 (0)