Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b55d10c authored by Mark Rutland's avatar Mark Rutland
Browse files

arm: arch_timer: balance device_node refcounting



When we get the device_node for the arch timer, it's refcount is
automatically incremented in of_find_matching_node, but it is
never decremented.

This patch decrements the refcount on the node after we're finished
using it.

Reported-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 9931faca
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -488,6 +488,8 @@ int __init arch_timer_of_register(void)
	for (i = PHYS_SECURE_PPI; i < MAX_TIMER_PPI; i++)
	for (i = PHYS_SECURE_PPI; i < MAX_TIMER_PPI; i++)
		arch_timer_ppi[i] = irq_of_parse_and_map(np, i);
		arch_timer_ppi[i] = irq_of_parse_and_map(np, i);


	of_node_put(np);

	/*
	/*
	 * If no interrupt provided for virtual timer, we'll have to
	 * If no interrupt provided for virtual timer, we'll have to
	 * stick to the physical timer. It'd better be accessible...
	 * stick to the physical timer. It'd better be accessible...