diff options
author | David Dueck <davidcdueck@googlemail.com> | 2015-06-26 15:30:22 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-07-02 09:51:50 -0700 |
commit | c76a024e82bdb83a0f7d57e006f8e7f8ddf983e5 (patch) | |
tree | 3fbd028af32dd69f1fea0a5fe36dd3c3db26ade8 /drivers/clk/at91/clk-h32mx.c | |
parent | 15ab38273d21a45487116ad4c428593427954848 (diff) |
clk: at91: do not leak resources
Do not leak memory and free irqs in case of an error.
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: David Dueck <davidcdueck@googlemail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/at91/clk-h32mx.c')
-rw-r--r-- | drivers/clk/at91/clk-h32mx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/at91/clk-h32mx.c b/drivers/clk/at91/clk-h32mx.c index 152dcb3f7b5f..61566bcefa53 100644 --- a/drivers/clk/at91/clk-h32mx.c +++ b/drivers/clk/at91/clk-h32mx.c @@ -116,8 +116,10 @@ void __init of_sama5d4_clk_h32mx_setup(struct device_node *np, h32mxclk->pmc = pmc; clk = clk_register(NULL, &h32mxclk->hw); - if (!clk) + if (!clk) { + kfree(h32mxclk); return; + } of_clk_add_provider(np, of_clk_src_simple_get, clk); } |