diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2016-09-20 12:39:47 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-11-02 01:32:25 +0100 |
commit | 45261a3e625dffbfab08f3b9cad84403ddd512e6 (patch) | |
tree | fa2c7d7277ea899b4f94e8e9abe8c8fcfd5ec97d /drivers/clk/nxp | |
parent | clk: lpc32xx: add a quirk for PWM and MS clock dividers (diff) | |
download | linux-45261a3e625dffbfab08f3b9cad84403ddd512e6.tar.xz linux-45261a3e625dffbfab08f3b9cad84403ddd512e6.zip |
clk: nxp: clk-lpc18xx-ccu: Unmap region obtained by of_iomap
Free memory mapping, if lpc18xx_ccu_init() is not successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/nxp')
-rw-r--r-- | drivers/clk/nxp/clk-lpc18xx-ccu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/clk/nxp/clk-lpc18xx-ccu.c b/drivers/clk/nxp/clk-lpc18xx-ccu.c index f7136b94fd0e..27781b49eb82 100644 --- a/drivers/clk/nxp/clk-lpc18xx-ccu.c +++ b/drivers/clk/nxp/clk-lpc18xx-ccu.c @@ -277,12 +277,15 @@ static void __init lpc18xx_ccu_init(struct device_node *np) } clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL); - if (!clk_data) + if (!clk_data) { + iounmap(reg_base); return; + } clk_data->num = of_property_count_strings(np, "clock-names"); clk_data->name = kcalloc(clk_data->num, sizeof(char *), GFP_KERNEL); if (!clk_data->name) { + iounmap(reg_base); kfree(clk_data); return; } |