diff options
Diffstat (limited to 'arch/arm/mach-spear/time.c')
-rw-r--r-- | arch/arm/mach-spear/time.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c index 6baf952fa902..e979e2197f8e 100644 --- a/arch/arm/mach-spear/time.c +++ b/arch/arm/mach-spear/time.c @@ -215,13 +215,13 @@ void __init spear_setup_of_timer(void) irq = irq_of_parse_and_map(np, 0); if (!irq) { pr_err("%s: No irq passed for timer via DT\n", __func__); - return; + goto err_put_np; } gpt_base = of_iomap(np, 0); if (!gpt_base) { pr_err("%s: of iomap failed\n", __func__); - return; + goto err_put_np; } gpt_clk = clk_get_sys("gpt0", NULL); @@ -236,6 +236,8 @@ void __init spear_setup_of_timer(void) goto err_prepare_enable_clk; } + of_node_put(np); + spear_clockevent_init(irq); spear_clocksource_init(); @@ -245,4 +247,6 @@ err_prepare_enable_clk: clk_put(gpt_clk); err_iomap: iounmap(gpt_base); +err_put_np: + of_node_put(np); } |