From: Shawn Lin Date: Sun, 13 Mar 2016 04:13:22 +0000 (+0800) Subject: UPSTREAM: clk: rockchip: release io resource when failing to init clk X-Git-Tag: firefly_0821_release~2402 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d22154750ca7e1a97b55d2d2fd0d115efa06a08f;p=firefly-linux-kernel-4.4.55.git 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 --- 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; }