Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751583AbdF1Ivd (ORCPT ); Wed, 28 Jun 2017 04:51:33 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34486 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475AbdF1Iv1 (ORCPT ); Wed, 28 Jun 2017 04:51:27 -0400 From: Arvind Yadav To: baohua@kernel.org, daniel.lezcano@linaro.org, tglx@linutronix.de Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] clocksource: timer-atlas7: Unmap region obtained by of_iomap. Date: Wed, 28 Jun 2017 14:20:35 +0530 Message-Id: <9f0111845863f80d4c04a62441c2f68a0d8a2eb0.1498639755.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 868 Lines: 28 In case of error at init time, rollback iomapping. Signed-off-by: Arvind Yadav --- drivers/clocksource/timer-atlas7.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clocksource/timer-atlas7.c b/drivers/clocksource/timer-atlas7.c index 50300ee..1811038 100644 --- a/drivers/clocksource/timer-atlas7.c +++ b/drivers/clocksource/timer-atlas7.c @@ -272,12 +272,14 @@ static int __init sirfsoc_of_timer_init(struct device_node *np) sirfsoc_timer_irq.irq = irq_of_parse_and_map(np, 0); if (!sirfsoc_timer_irq.irq) { pr_err("No irq passed for timer0 via DT\n"); + iounmap(sirfsoc_timer_base); return -EINVAL; } sirfsoc_timer1_irq.irq = irq_of_parse_and_map(np, 1); if (!sirfsoc_timer1_irq.irq) { pr_err("No irq passed for timer1 via DT\n"); + iounmap(sirfsoc_timer_base); return -EINVAL; } -- 1.9.1