Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Prashant Gaikwad <pgaikwad@nvidia.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Mikko Perttunen <mperttunen@nvidia.com>,
	Tomeu Vizoso <tomeu@tomeuvizoso.net>,
	linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: tegra: tegra124-emc: put EMC node on register failure
Date: Wed, 8 Jul 2026 12:41:47 -0400	[thread overview]
Message-ID: <ak59y2H3IsHsZ15L@redhat.com> (raw)
In-Reply-To: <20260708112058.750952-1-lgs201920130244@gmail.com>

On Wed, Jul 08, 2026 at 07:20:58PM +0800, Guangshuo Li wrote:
> tegra124_clk_register_emc() stores a device node reference returned by
> of_parse_phandle() in tegra->emc_node.
> 
> If clk_register() fails, the function returns an error before that
> reference can be consumed and released by the normal runtime path. The
> tegra_clk_emc object is freed on this failure path, but freeing the
> object does not drop the OF node reference stored in it.
> 
> Drop the EMC node reference before freeing the tegra_clk_emc object.
> of_node_put() is safe for a NULL node, so this also covers the case where
> the phandle is absent.
> 
> Fixes: 2db04f16b589 ("clk: tegra: Add EMC clock driver")
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>

Reviewed-by: Brian Masney <bmasney@redhat.com>


      reply	other threads:[~2026-07-08 16:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 11:20 [PATCH] clk: tegra: tegra124-emc: put EMC node on register failure Guangshuo Li
2026-07-08 16:41 ` Brian Masney [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=ak59y2H3IsHsZ15L@redhat.com \
    --to=bmasney@redhat.com \
    --cc=jonathanh@nvidia.com \
    --cc=lgs201920130244@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=mturquette@baylibre.com \
    --cc=pgaikwad@nvidia.com \
    --cc=sboyd@kernel.org \
    --cc=thierry.reding@kernel.org \
    --cc=tomeu@tomeuvizoso.net \
    /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