summaryrefslogtreecommitdiffstats
path: root/drivers/clk/mediatek
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2016-09-20 10:30:42 +0200
committerStephen Boyd <sboyd@codeaurora.org>2016-09-21 10:06:07 +0200
commitaf9083627b4764272a341902e37af17188bc17f0 (patch)
treef6059350eeddacfd49774dc415d56a34ac7411ae /drivers/clk/mediatek
parentclk: sunxi-ng: Fix reset offset for the A23 and A33 (diff)
downloadlinux-af9083627b4764272a341902e37af17188bc17f0.tar.xz
linux-af9083627b4764272a341902e37af17188bc17f0.zip
clk: mediatek: clk-mt8173: Unmap region obtained by of_iomap
Free memory mapping if init is not successful. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: James Liao <jamesjj.liao@mediatek.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/mediatek')
-rw-r--r--drivers/clk/mediatek/clk-mt8173.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c
index 10c986018a08..0ac3aee87726 100644
--- a/drivers/clk/mediatek/clk-mt8173.c
+++ b/drivers/clk/mediatek/clk-mt8173.c
@@ -1074,8 +1074,10 @@ static void __init mtk_apmixedsys_init(struct device_node *node)
}
mt8173_pll_clk_data = clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
- if (!clk_data)
+ if (!clk_data) {
+ iounmap(base);
return;
+ }
mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);