From patchwork Tue Sep 20 08:30:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9341217 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B0203607D0 for ; Tue, 20 Sep 2016 08:31:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A29852939E for ; Tue, 20 Sep 2016 08:31:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9401429597; Tue, 20 Sep 2016 08:31:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79A3429403 for ; Tue, 20 Sep 2016 08:31:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751234AbcITIbm (ORCPT ); Tue, 20 Sep 2016 04:31:42 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:35459 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750730AbcITIbk (ORCPT ); Tue, 20 Sep 2016 04:31:40 -0400 Received: by mail-pa0-f66.google.com with SMTP id hi10so611286pac.2; Tue, 20 Sep 2016 01:31:40 -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=ZFSZr/vCjKpcITTrrAN/vnDDPpk1zn1q0HGhHWsFDHg=; b=ianyNCwy1zVJM8Ym6ev0+HqgyBVmsjW45aW3jrbQNd3PFrjlo40smqGBNXsTCAEKlh rmmg607BqnP5kdu46NTdGA14E8+1/SJycCwq+HLPJkbYIzdyL2TvTnWGv+jY0XnxjuRe k9EgggeirWXSEp/+gfUZPcUjGHFysg+P3BngLkB8xJDgzrzevc/muO3AEBAWbbPcylx1 TIz9sI6cnncwcZkFriP6QxVZngIailbgGLhoJyaGXMZ3QVww4Y5GP+WGYROZSSPxvAZF N6KqPRNBd3pNlLquOM1FWbNCtiSN220+yiGdrnjeELWKij84y4SNCKmnCBWAaItuu5OQ EeMw== 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=ZFSZr/vCjKpcITTrrAN/vnDDPpk1zn1q0HGhHWsFDHg=; b=kP9m02HvqtC+iaFolRhx7XtGF9LHED0l0/tc3OgjjwDeWtTAJRc0d5Whzls7DjfqlX QhCLVc5knM37u8JRd15bVGCGE7IYEZhCHun/rbxrG2nh+6OUVv2mijWjlw6U5Fru/pZX x2Ohcp2db7B5RKUqTzMjTL1yTIq+F0eWIK61J+xRbEhLlJuNyRg4nDvPPLcFMiPwfmgz AgE7LPPqtozbKLxCpRcII9y9kmAKOQkD4Sg9rbt6ooplrRfFIVT38krZRB+ivUpR7n0t WAcD2PCZPSJUhiuhKLIfAb9daFeQP0nyH6uPRDBiesRQ/eERlQ15+emco4LKa0yBGIeS bTzA== X-Gm-Message-State: AE9vXwMNBAuVbdH3dpmxwULzu9M0g/HsYSPHYSW+CTn128UKFkd3fZqf0tncM8xBPnDRtQ== X-Received: by 10.66.163.129 with SMTP id yi1mr52908826pab.47.1474360300125; Tue, 20 Sep 2016 01:31:40 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.symbol.com ([140.101.159.242]) by smtp.googlemail.com with ESMTPSA id h8sm45921445pfk.88.2016.09.20.01.31.36 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Sep 2016 01:31:39 -0700 (PDT) From: Arvind Yadav X-Google-Original-From: Arvind Yadav To: mturquette@baylibre.com, sboyd@codeaurora.org, matthias.bgg@gmail.com Cc: jamesjj.liao@mediatek.com, djkurtz@chromium.org, p.zabel@pengutronix.de, yingjoe.chen@mediatek.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Arvind Yadav Subject: [PATCH] clk: mediatek: clk-mt8173: Unmap region obtained by of_iomap Date: Tue, 20 Sep 2016 14:00:42 +0530 Message-Id: <1474360242-15126-1-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Arvind Yadav Free memory mapping, if init is not successful. Signed-off-by: Arvind Yadav Reviewed-by: James Liao --- drivers/clk/mediatek/clk-mt8173.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c index 10c9860..0ac3aee 100644 --- a/drivers/clk/mediatek/clk-mt8173.c +++ b/drivers/clk/mediatek/clk-mt8173.c @@ -1074,8 +1074,10 @@ static void __init mtk_apmixedsys_init(struct device_node *node) } mt8173_pll_clk_data = clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK); - if (!clk_data) + if (!clk_data) { + iounmap(base); return; + } mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);