summaryrefslogtreecommitdiff
path: root/drivers/clk/rockchip/clk-rk3188.c
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-03-13 12:13:22 +0800
committerHeiko Stuebner <heiko@sntech.de>2016-03-27 13:03:35 +0200
commit1d003eb0805ac5b549e76202a1e95da33f62cb9a (patch)
tree372bc7310ebd63735e067e43e06e02c3aeca46d9 /drivers/clk/rockchip/clk-rk3188.c
parentff1ae209617cb31a5297bd103709d6b9e2db77d2 (diff)
downloadlwn-1d003eb0805ac5b549e76202a1e95da33f62cb9a.tar.gz
lwn-1d003eb0805ac5b549e76202a1e95da33f62cb9a.zip
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 <shawn.lin@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/clk/rockchip/clk-rk3188.c')
-rw-r--r--drivers/clk/rockchip/clk-rk3188.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
index 0fcce2295b37..d0e722a0e8cf 100644
--- a/drivers/clk/rockchip/clk-rk3188.c
+++ b/drivers/clk/rockchip/clk-rk3188.c
@@ -773,6 +773,7 @@ static struct rockchip_clk_provider *__init rk3188_common_clk_init(struct device
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 ERR_PTR(-ENOMEM);
}