summaryrefslogtreecommitdiff
path: root/drivers/clk/rockchip
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-06-03 03:54:18 +0300
committerHeiko Stuebner <heiko@sntech.de>2016-06-03 16:36:49 +0300
commit62d0e71df063101e4551327bd9fa9aaa3535c86b (patch)
tree978dc17ad59ad4d7c0b6cfd4d3d5c592d906c05c /drivers/clk/rockchip
parent3183c0d519ff83af2926382c11716496f01d34bf (diff)
downloadlinux-62d0e71df063101e4551327bd9fa9aaa3535c86b.tar.xz
clk: rockchip: release io resource when failing to init clk on rk3399
We should call iounmap to relase reg_base since it's not going to be used any more if failing to init clk. This was missing on the newly added rk3399 clock tree. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/clk/rockchip')
-rw-r--r--drivers/clk/rockchip/clk-rk3399.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c
index 9f86bfef70f7..8059a8d3ea36 100644
--- a/drivers/clk/rockchip/clk-rk3399.c
+++ b/drivers/clk/rockchip/clk-rk3399.c
@@ -1510,6 +1510,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;
}
@@ -1555,6 +1556,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;
}