linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Tero Kristo <t-kristo@ti.com>, linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Mike Turquette <mturquette@linaro.org>
Subject: Re: [PATCH] clk: ti: dra7-atl-clock: fix a memory leak
Date: Mon, 15 Sep 2014 12:05:28 +0300	[thread overview]
Message-ID: <5416ABD8.4040906@ti.com> (raw)
In-Reply-To: <1410529147-19950-1-git-send-email-t-kristo@ti.com>

On 09/12/2014 04:39 PM, Tero Kristo wrote:
> of_clk_add_provider makes an internal copy of the parent_names property
> while its called, thus it is no longer needed after this call and can
> be freed.

Thanks Tero, indeed this was overlooked in the original driver.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>


> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> Cc: Mike Turquette <mturquette@linaro.org>
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>  drivers/clk/ti/clk-dra7-atl.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
> index 4a65b41..3f9308a 100644
> --- a/drivers/clk/ti/clk-dra7-atl.c
> +++ b/drivers/clk/ti/clk-dra7-atl.c
> @@ -199,6 +199,7 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
>  
>  	if (!IS_ERR(clk)) {
>  		of_clk_add_provider(node, of_clk_src_simple_get, clk);
> +		kfree(parent_names);
>  		return;
>  	}
>  cleanup:
> 


-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-09-15  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 13:39 [PATCH] clk: ti: dra7-atl-clock: fix a memory leak Tero Kristo
2014-09-15  9:05 ` Peter Ujfalusi [this message]
2014-09-29  8:52   ` Tero Kristo

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=5416ABD8.4040906@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=t-kristo@ti.com \
    /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;
as well as URLs for NNTP newsgroup(s).