Skip to content

Commit

Permalink
arm: arch_timer: balance device_node refcounting
Browse files Browse the repository at this point in the history
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: Will Deacon <will.deacon@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Mark Rutland committed Jan 31, 2013
1 parent 9931fac commit 2b55d10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/kernel/arch_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ int __init arch_timer_of_register(void)
for (i = PHYS_SECURE_PPI; i < MAX_TIMER_PPI; 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
* stick to the physical timer. It'd better be accessible...
Expand Down

0 comments on commit 2b55d10

Please sign in to comment.