From patchwork Wed Sep 21 15:53:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 672950 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3sfPLb4zQzz9snm for ; Thu, 22 Sep 2016 01:53:59 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=uX5P55Fl; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755342AbcIUPx6 (ORCPT ); Wed, 21 Sep 2016 11:53:58 -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 Received: by mail-pa0-f68.google.com with SMTP id s3so1077320pay.1; Wed, 21 Sep 2016 08:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=tVBloMIML+wiiGAfozjZmG2TwIj21LB4YuLwMQruK0A=; b=uX5P55FlP1ntoKofgpMACBYZTa86jrk+VC/KTgfnxmldilHmPsQmf8+eueIKqaw245 OVKO2Ahhf/0NfApC92ZvxfJnBYtHRRJX2RkF9Y2L5rBR0l7QKTgKWNlzrBcXKjhPg+IR 2rMzfjsRmqES7P5Ow33oapml8VnHo6xU14Nm10kuaouFOnAn3+6fxpxhUDVWyse1mx0I ocPpy5Gj4vnhbouaJ8wT+z6wZwLto4nDiPkEtWki8foMB0ttiNLDL6salso4u1qUKjau Fn5HKPa4XJU/GacELI01zwrNuEKacbBBTAuuIW6qdJKgb6D9AZ4yax1VrQA1gH2Qi/ke bBfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tVBloMIML+wiiGAfozjZmG2TwIj21LB4YuLwMQruK0A=; b=UANvFd483aivok3IJcu+0cQqODpP53kj/22Xon+zuNZoE5CWQ172tAkVLfnh2jLmTP B7pjPa3Iz/9lDVfCHOoBlTKgTmJQYWFD0u9KFavf1i2nkDl7QyrGwNYaDWWUE9C3gIXR VJzj8ULfnmjK2guLXKHodnOJEue23Z3GQfKGj/0iFxPMNHkXWWnFlLBvfNBealBOUMlo ppSmVJQXniNZuG2FBuKhTZQgJOH+FiygW+If4p4klkuUIZMoWTyBlqQ/2DbRD0cvoD4K fVS6VWfnSn9xcA+ugCtUQUdCDeDnDBTCKNweJ3J3rJckZS3kKVqBe8HeM/1YsDk9xaSe Lzog== X-Gm-Message-State: AE9vXwOh/Uz3YluSaGd7zB3Iy4FtF/U9Ul3I/jhuuu+AFZJTtYZQ4MvXMoeJwkVnEhJSOw== X-Received: by 10.66.149.138 with SMTP id ua10mr48334443pab.146.1474473236517; Wed, 21 Sep 2016 08:53:56 -0700 (PDT) Received: from localhost.localdomain ([103.16.70.178]) by smtp.gmail.com with ESMTPSA id wa9sm47715021pac.35.2016.09.21.08.53.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Sep 2016 08:53:56 -0700 (PDT) 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-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@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; }