From d22154750ca7e1a97b55d2d2fd0d115efa06a08f Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Sun, 13 Mar 2016 12:13:22 +0800 Subject: [PATCH] UPSTREAM: clk: rockchip: release io resource when failing to init clk 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 Signed-off-by: Heiko Stuebner (cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git v4.8-clk/next commit 1d003eb0805ac5b549e76202a1e95da33f62cb9a) Change-Id: Ia0161885786d6504fee7e76c6620df98bb2cdb21 Signed-off-by: Xing Zheng --- drivers/clk/rockchip/clk-rk3228.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c index c112b2f95224..016bdb0b793a 100644 --- a/drivers/clk/rockchip/clk-rk3228.c +++ b/drivers/clk/rockchip/clk-rk3228.c @@ -640,6 +640,7 @@ static void __init rk3228_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; } -- 2.34.1