Skip to content

Commit 608d94c

Browse files
windhltsbogend
authored andcommitted
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>
1 parent 4becf64 commit 608d94c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/mips/mti-malta/malta-time.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ static void update_gic_frequency_dt(void)
214214

215215
if (of_update_property(node, &gic_frequency_prop) < 0)
216216
pr_err("error updating gic frequency property\n");
217+
218+
of_node_put(node);
217219
}
218220

219221
#endif

0 commit comments

Comments
 (0)