diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2016-09-20 11:30:42 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-09-21 11:06:07 +0300 |
commit | af9083627b4764272a341902e37af17188bc17f0 (patch) | |
tree | f6059350eeddacfd49774dc415d56a34ac7411ae /drivers/clk/mediatek | |
parent | 5519cf23ad548c3991ce9ce5c44dba963d11fe85 (diff) | |
download | linux-af9083627b4764272a341902e37af17188bc17f0.tar.xz |
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.c | 4 |
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); |