From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756322AbcIUPx7 (ORCPT ); Wed, 21 Sep 2016 11:53:59 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:34016 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751635AbcIUPx5 (ORCPT ); Wed, 21 Sep 2016 11:53:57 -0400 From: Arvind Yadav To: daniel.lezcano@linaro.org, tglx@linutronix.de, swarren@wwwdotorg.org, thierry.reding@gmail.com, gnurou@gmail.com Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH] clocksource: tegra20_timer: Unmap region obtained by of_iomap Date: Wed, 21 Sep 2016 21:23:35 +0530 Message-Id: <1474473215-8553-1-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Free memory mapping, if tegra20_init_timer is not successful. Signed-off-by: Arvind Yadav --- drivers/clocksource/tegra20_timer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c index f960891..adcd7f4 100644 --- a/drivers/clocksource/tegra20_timer.c +++ b/drivers/clocksource/tegra20_timer.c @@ -180,6 +180,7 @@ static int __init tegra20_init_timer(struct device_node *np) tegra_timer_irq.irq = irq_of_parse_and_map(np, 2); if (tegra_timer_irq.irq <= 0) { pr_err("Failed to map timer IRQ\n"); + iounmap(timer_reg_base); return -EINVAL; } @@ -216,6 +217,7 @@ static int __init tegra20_init_timer(struct device_node *np) clocksource_mmio_readl_up); if (ret) { pr_err("Failed to register clocksource\n"); + iounmap(timer_reg_base); return ret; } @@ -227,6 +229,7 @@ static int __init tegra20_init_timer(struct device_node *np) ret = setup_irq(tegra_timer_irq.irq, &tegra_timer_irq); if (ret) { pr_err("Failed to register timer IRQ: %d\n", ret); + iounmap(timer_reg_base); return ret; } -- 2.7.4