From 1d003eb0805ac5b549e76202a1e95da33f62cb9a Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Sun, 13 Mar 2016 12:13:22 +0800 Subject: 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 --- drivers/clk/rockchip/clk-rk3368.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/clk/rockchip/clk-rk3368.c') diff --git a/drivers/clk/rockchip/clk-rk3368.c b/drivers/clk/rockchip/clk-rk3368.c index 3121414cfd63..6cb474c593e7 100644 --- a/drivers/clk/rockchip/clk-rk3368.c +++ b/drivers/clk/rockchip/clk-rk3368.c @@ -875,6 +875,7 @@ static void __init rk3368_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; } -- cgit v1.2.3