diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2016-09-19 10:21:24 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-12-09 01:35:22 +0100 |
commit | 16cd77645bddbcee951c63b964f23826dadbfd2e (patch) | |
tree | c188fa017b8897c2854964b4defbd2c9fa0ab2c1 /drivers/clk | |
parent | clk: keystone: pll: Unmap region obtained by of_iomap (diff) | |
download | linux-16cd77645bddbcee951c63b964f23826dadbfd2e.tar.xz linux-16cd77645bddbcee951c63b964f23826dadbfd2e.zip |
clk: st: clk-flexgen: Unmap region obtained by of_iomap
Free memory mapping, if probe is not successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/st/clk-flexgen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c index a485f3b284b9..918ba3164da9 100644 --- a/drivers/clk/st/clk-flexgen.c +++ b/drivers/clk/st/clk-flexgen.c @@ -329,8 +329,10 @@ static void __init st_of_flexgen_setup(struct device_node *np) return; parents = flexgen_get_parents(np, &num_parents); - if (!parents) + if (!parents) { + iounmap(reg); return; + } match = of_match_node(flexgen_of_match, np); if (match) { @@ -394,6 +396,7 @@ static void __init st_of_flexgen_setup(struct device_node *np) return; err: + iounmap(reg); if (clk_data) kfree(clk_data->clks); kfree(clk_data); |