linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>, <t-kristo@ti.com>,
	<mturquette@baylibre.com>, <sboyd@codeaurora.org>
Cc: <linux-omap@vger.kernel.org>, <linux-clk@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <tony@atomide.com>
Subject: Re: [PATCH] clk: ti: dra7-atl-clock: Fix of_node reference counting
Date: Fri, 11 Mar 2016 14:19:27 -0600	[thread overview]
Message-ID: <56E3284F.3070801@ti.com> (raw)
In-Reply-To: <1457705612-7684-1-git-send-email-peter.ujfalusi@ti.com>

On 03/11/2016 08:13 AM, Peter Ujfalusi wrote:
> of_find_node_by_name() will call of_node_put() on the node so we need to
> get it first to avoid warnings.
> The cfg_node needs to be put after we have finished processing the
> properties.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>  drivers/clk/ti/clk-dra7-atl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
> index 2e14dfb588f4..c77333230bdf 100644
> --- a/drivers/clk/ti/clk-dra7-atl.c
> +++ b/drivers/clk/ti/clk-dra7-atl.c
> @@ -265,6 +265,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
>  
>  		/* Get configuration for the ATL instances */
>  		snprintf(prop, sizeof(prop), "atl%u", i);
> +		of_node_get(node);
>  		cfg_node = of_find_node_by_name(node, prop);
>  		if (cfg_node) {
>  			ret = of_property_read_u32(cfg_node, "bws",
> @@ -278,6 +279,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
>  				atl_write(cinfo, DRA7_ATL_AWSMUX_REG(i),
>  					  cdesc->aws);
>  			}
> +			of_node_put(cfg_node);
>  		}
>  
>  		cdesc->probed = true;
> 

Tested-by: Nishanth Menon <nm@ti.com>

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2016-03-11 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 14:13 [PATCH] clk: ti: dra7-atl-clock: Fix of_node reference counting Peter Ujfalusi
2016-03-11 20:19 ` Nishanth Menon [this message]
2016-04-16  0:47 ` Stephen Boyd

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=56E3284F.3070801@ti.com \
    --to=nm@ti.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=sboyd@codeaurora.org \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.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).