LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: Yixun Lan <yixun.lan@amlogic.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Carlo Caione <carlo@caione.org>
Cc: Rob Herring <robh@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Qiufang Dai <qiufang.dai@amlogic.com>,
	linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/7] clk: meson: migrate to devm_of_clk_add_hw_provider API
Date: Fri, 27 Apr 2018 12:00:52 +0200	[thread overview]
Message-ID: <1524823252.4026.124.camel@baylibre.com> (raw)
In-Reply-To: <20180426084437.192394-2-yixun.lan@amlogic.com>

On Thu, 2018-04-26 at 16:44 +0800, Yixun Lan wrote:
> There is a protential memory leak, as of_clk_del_provider is
> never called if of_clk_add_hw_provider has been executed.
> Fix this by using devm variant API.
> 
> Fixes: f8c11f79912d ("clk: meson: Add GXBB AO Clock and Reset controller driver")
> Suggested-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
> ---
>  drivers/clk/meson/gxbb-aoclk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c
> index 9ec23ae9a219..eebb580b9e0f 100644
> --- a/drivers/clk/meson/gxbb-aoclk.c
> +++ b/drivers/clk/meson/gxbb-aoclk.c
> @@ -191,7 +191,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
> +	return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get,
>  			&gxbb_aoclk_onecell_data);
>  }
>  

Applied
Thx

  reply	other threads:[~2018-04-27 10:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26  8:44 [PATCH v7 0/7] clk: meson-axg: Add AO Cloclk and Reset driver Yixun Lan
2018-04-26  8:44 ` [PATCH v7 1/7] clk: meson: migrate to devm_of_clk_add_hw_provider API Yixun Lan
2018-04-27 10:00   ` Jerome Brunet [this message]
2018-04-26  8:44 ` [PATCH v7 2/7] clk: meson: aoclk: refactor common code into dedicated file Yixun Lan
2018-04-26  8:44 ` [PATCH v7 3/7] dt-bindings: clock: axg-aoclkc: New binding for Meson-AXG SoC Yixun Lan
2018-04-26  8:44 ` [PATCH v7 4/7] dt-bindings: clock: reset: Add AXG AO Clock and Reset Bindings Yixun Lan
2018-04-26  8:59   ` Philipp Zabel
2018-04-26  9:05     ` Yixun Lan
2018-04-26  8:44 ` [PATCH v7 5/7] clk: meson-axg: Add AO Clock and Reset controller driver Yixun Lan
2018-04-26  8:59   ` Philipp Zabel
2018-04-26  8:44 ` [PATCH v7 6/7] clk: meson: drop CLK_SET_RATE_PARENT flag Yixun Lan
2018-04-26  8:44 ` [PATCH v7 7/7] clk: meson: drop CLK_IGNORE_UNUSED flag Yixun Lan
2018-04-27  9:20 ` [PATCH v7 0/7] clk: meson-axg: Add AO Cloclk and Reset driver Jerome Brunet
2018-04-27  9:31   ` Yixun Lan
2018-04-27  9:59     ` Jerome Brunet
2018-04-27 12:33       ` Yixun Lan
2018-04-27 18:49         ` Kevin Hilman
2018-04-28  1:50           ` Yixun Lan

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=1524823252.4026.124.camel@baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=carlo@caione.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=narmstrong@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=qiufang.dai@amlogic.com \
    --cc=robh@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=yixun.lan@amlogic.com \
    --subject='Re: [PATCH v7 1/7] clk: meson: migrate to devm_of_clk_add_hw_provider API' \
    /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

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).