All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Myeonghun Pak <mhun512@gmail.com>
Cc: Alex Helms <alexander.helms.jy@renesas.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ijae Kim <ae878000@gmail.com>
Subject: Re: [PATCH v2] clk: versaclock7: Fix APLL clock leak on probe failure
Date: Tue, 23 Jun 2026 10:15:24 -0400	[thread overview]
Message-ID: <ajqU_N4IXj2wnYQh@redhat.com> (raw)
In-Reply-To: <20260623094023.94231-1-mhun512@gmail.com>

On Tue, Jun 23, 2026 at 06:40:18PM +0900, Myeonghun Pak wrote:
> vc7_probe() registers the APLL with clk_register_fixed_rate(), which is
> not devm-managed and must be explicitly unregistered on probe failure.
> 
> Most later errors already unwind through err_clk, but a failure from
> vc7_get_bank_clk() in the output registration loop returned directly.
> That skipped clk_unregister_fixed_rate() and leaked the APLL clock.
> 
> Route that error through the existing err_clk label so the fixed-rate
> clock is released consistently with the other probe failure paths.
> 
> This issue was identified during our ongoing static-analysis research while
> reviewing kernel code.
> 
> Fixes: 48c5e98fedd9 ("clk: Renesas versaclock7 ccf device driver")
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>

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


      reply	other threads:[~2026-06-23 14:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23  9:40 [PATCH v2] clk: versaclock7: Fix APLL clock leak on probe failure Myeonghun Pak
2026-06-23 14:15 ` 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=ajqU_N4IXj2wnYQh@redhat.com \
    --to=bmasney@redhat.com \
    --cc=ae878000@gmail.com \
    --cc=alexander.helms.jy@renesas.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhun512@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.