linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] clk: rockchip: release io resource when failing to init clk
@ 2016-06-03  0:54 Shawn Lin
  2016-06-03 13:42 ` Heiko Stübner
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Lin @ 2016-06-03  0:54 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: linux-clk, Stephen Boyd, Xing Zheng, linux-rockchip,
	linux-kernel, Shawn Lin

We should call iounmap to relase reg_base since it's not going
to be used any more if failing to init clk.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/clk/rockchip/clk-rk3399.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c
index b6742fa..37c74cb 100644
--- a/drivers/clk/rockchip/clk-rk3399.c
+++ b/drivers/clk/rockchip/clk-rk3399.c
@@ -1509,6 +1509,7 @@ static void __init rk3399_clk_init(struct device_node *np)
 	ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
 	if (IS_ERR(ctx)) {
 		pr_err("%s: rockchip clk init failed\n", __func__);
+		iounmap(reg_base);
 		return;
 	}
 
@@ -1562,6 +1563,7 @@ static void __init rk3399_pmu_clk_init(struct device_node *np)
 	ctx = rockchip_clk_init(np, reg_base, CLKPMU_NR_CLKS);
 	if (IS_ERR(ctx)) {
 		pr_err("%s: rockchip pmu clk init failed\n", __func__);
+		iounmap(reg_base);
 		return;
 	}
 
-- 
2.3.7

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] clk: rockchip: release io resource when failing to init clk
  2016-06-03  0:54 [PATCH 1/2] clk: rockchip: release io resource when failing to init clk Shawn Lin
@ 2016-06-03 13:42 ` Heiko Stübner
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stübner @ 2016-06-03 13:42 UTC (permalink / raw)
  To: Shawn Lin
  Cc: linux-clk, Stephen Boyd, Xing Zheng, linux-rockchip, linux-kernel

Am Freitag, 3. Juni 2016, 08:54:18 schrieb Shawn Lin:
> We should call iounmap to relase reg_base since it's not going
> to be used any more if failing to init clk.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

applied to my clk-fixes branch for 4.7, after adding a line to the patch-
description explaining that this is really just missing on rk3399 (and after 
checking that the iounmaps are already present on the old clock-trees)


Thanks for catching this
Heiko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-03 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-03  0:54 [PATCH 1/2] clk: rockchip: release io resource when failing to init clk Shawn Lin
2016-06-03 13:42 ` Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).