Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/maple: Add missing of_node_put() in time.c

In maple_get_boot_time(), of_find_compatible_node() will return
a node pointer with refcount incremented. The reference should be
dropped with of_node_put() when it is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220617124045.4048757-1-windhl@126.com

authored by

Liang He and committed by
Michael Ellerman
23b14818 14b9e26c

+1
+1
arch/powerpc/platforms/maple/time.c
··· 153 153 maple_rtc_addr); 154 154 } 155 155 bail: 156 + of_node_put(rtcs); 156 157 if (maple_rtc_addr == 0) { 157 158 maple_rtc_addr = RTC_PORT(0); /* legacy address */ 158 159 printk(KERN_INFO "Maple: No device node for RTC, assuming "