linux-mips
[Top] [All Lists]

[v1] mips: ath79: clock:- Unmap region obtained by of_iomap

To: ralf@linux-mips.org
Subject: [v1] mips: ath79: clock:- Unmap region obtained by of_iomap
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Mon, 2 Jan 2017 15:18:21 +0530
Cc: antonynpavlov@gmail.com, albeu@free.fr, hackpascal@gmail.com, sboyd@codeaurora.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=B2qQ28YWEk7NhSw48mmoWn0tvENdjKC1j9mkvoLSOwk=; b=ZbXZJXiy223b/U4eX4qQglcj7Gmbgotatc3OXA7gPWJzY9Ky9yi2djXeyl7sO9wx5h impJZevJhPv3AE5TQ+mdKW0KGbt6dMxRGAL8qcaMyVhwzWol0i9Ay9tplSofm7oU/CEx Enx6RoLzAIL5fDcfkxn/71Fnm0JG2ZExHEyGt030F0rvq+yMBXVIJtDVvzVxry9Wl0PD 0VqZ12ctxOfUh+mSXvWVxVZKWtigJxYgqkoiuXRa5YNHbQtEYzswWpKLZxRbtH8SO8Ty ki0V5XVunLnhZsZwIkZ4P9hVNIP+twkl/zlWoupNbG5XyahGPRIObMnne2YZwHdyc1RR y/Tg==
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Free memory mapping, if ath79_clocks_init_dt_ng is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 arch/mips/ath79/clock.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c
index cc3a1e3..7e2bb12 100644
--- a/arch/mips/ath79/clock.c
+++ b/arch/mips/ath79/clock.c
@@ -508,16 +508,19 @@ static void __init ath79_clocks_init_dt_ng(struct 
device_node *np)
                ar9330_clk_init(ref_clk, pll_base);
        else {
                pr_err("%s: could not find any appropriate clk_init()\n", dnfn);
-               goto err_clk;
+               goto err_iounmap;
        }
 
        if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) {
                pr_err("%s: could not register clk provider\n", dnfn);
-               goto err_clk;
+               goto err_iounmap;
        }
 
        return;
 
+err_iounmap:
+       iounmap(pll_base);
+
 err_clk:
        clk_put(ref_clk);
 
-- 
1.9.1


<Prev in Thread] Current Thread [Next in Thread>
  • [v1] mips: ath79: clock:- Unmap region obtained by of_iomap, Arvind Yadav <=