提交 62d0e71d 编写于 作者: S Shawn Lin 提交者: Heiko Stuebner

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: NShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
上级 3183c0d5
...@@ -1510,6 +1510,7 @@ static void __init rk3399_clk_init(struct device_node *np) ...@@ -1510,6 +1510,7 @@ static void __init rk3399_clk_init(struct device_node *np)
ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
if (IS_ERR(ctx)) { if (IS_ERR(ctx)) {
pr_err("%s: rockchip clk init failed\n", __func__); pr_err("%s: rockchip clk init failed\n", __func__);
iounmap(reg_base);
return; return;
} }
...@@ -1555,6 +1556,7 @@ static void __init rk3399_pmu_clk_init(struct device_node *np) ...@@ -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); ctx = rockchip_clk_init(np, reg_base, CLKPMU_NR_CLKS);
if (IS_ERR(ctx)) { if (IS_ERR(ctx)) {
pr_err("%s: rockchip pmu clk init failed\n", __func__); pr_err("%s: rockchip pmu clk init failed\n", __func__);
iounmap(reg_base);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册