RISC-V: add of_node_put()
PATCH 1/1 RISC-V: add of_node_put()
use of_node_put() to release the refcount.
Signed-off-by Yangtao Li <[email protected]>
--- arch/riscv/kernel/time.c | 1 + 1 file changed, 1 insertion(+)
arch/riscv/kernel/time.c +1 -0
@@ -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 ;
Signature · 1 line
2.17.0
Quoted 12 lines · tiny.windzz at gmail.com
use
of_node_put()to release the refcount.Signed-off-by Yangtao Li <[email protected]>--- arch/riscv/kernel/time.c | 1 + 1 file changed, 1 insertion(+)arch/riscv/kernel/time.c +0
-0
arch/riscv/kernel/time.c void __init time_init(void) · line 32
Quoted 7 lines
arch/riscv/kernel/time.c +1
-0@@ -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 ;
Thanks. I'm going to target this for next week's PR.