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 <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 4becf64 commit 608d94c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)