Skip to content

Commit

Permalink
clk: rockchip: release io resource when failing to init clk on rk3399
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Lin authored and Heiko Stuebner committed Jun 3, 2016
1 parent 3183c0d commit 62d0e71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/clk/rockchip/clk-rk3399.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 62d0e71

Please sign in to comment.