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

mips: mti-malta: Fix refcount leak in malta-time.c

In update_gic_frequency_dt(), of_find_compatible_node() will return
a node pointer with refcount incremented. We should use of_node_put()
when it is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Liang He and committed by
Thomas Bogendoerfer
608d94cb 4becf641

+2
+2
arch/mips/mti-malta/malta-time.c
··· 214 214 215 215 if (of_update_property(node, &gic_frequency_prop) < 0) 216 216 pr_err("error updating gic frequency property\n"); 217 + 218 + of_node_put(node); 217 219 } 218 220 219 221 #endif