From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: David Dueck <davidcdueck@googlemail.com>
Cc: mturquette@linaro.org, nicolas.ferre@atmel.com,
sboyd@codeaurora.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] clk: at91: clk-h32mxclk: fix memory leak
Date: Fri, 26 Jun 2015 15:12:15 +0200 [thread overview]
Message-ID: <20150626151215.2323965f@bbrezillon> (raw)
In-Reply-To: <1435322012-5667-1-git-send-email-davidcdueck@googlemail.com>
Hi David,
On Fri, 26 Jun 2015 14:33:27 +0200
David Dueck <davidcdueck@googlemail.com> wrote:
> Do not leak memory if clk_register fails.
Thanks for those fixes. Could you squash them in one single patch.
Once done you can add my
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Best Regards,
Boris
>
> Signed-off-by: David Dueck <davidcdueck@googlemail.com>
> ---
> drivers/clk/at91/clk-h32mx.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/at91/clk-h32mx.c b/drivers/clk/at91/clk-h32mx.c
> index 152dcb3..61566bc 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);
> }
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
prev parent reply other threads:[~2015-06-26 13:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 12:33 [PATCH 1/6] clk: at91: clk-h32mxclk: fix memory leak David Dueck
2015-06-26 12:33 ` [PATCH 2/6] clk: at91: clk-main: " David Dueck
2015-06-26 12:33 ` [PATCH 3/6] clk: at91: clk-master: fix error path David Dueck
2015-06-26 12:33 ` [PATCH 4/6] clk: at91: clk-pll: " David Dueck
2015-06-26 12:33 ` [PATCH 5/6] clk: at91: clk-system: " David Dueck
2015-06-26 12:33 ` [PATCH 6/6] clk: at91: clk-utmi: " David Dueck
2015-06-26 13:12 ` Boris Brezillon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150626151215.2323965f@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=davidcdueck@googlemail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=nicolas.ferre@atmel.com \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox