All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Coia Prant <coiaprant@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Serge Semin <fancer.lancer@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: pcs: xpcs: fix clock reference leak on xpcs_init_clks failure
Date: Mon, 21 Sep 2026 16:07:48 +0100	[thread overview]
Message-ID: <20260921150748.GU13925@horms.kernel.org> (raw)
In-Reply-To: <20260919172021.2336748-1-coiaprant@gmail.com>

On Sun, Sep 20, 2026 at 01:20:21AM +0800, Coia Prant wrote:
> xpcs_init_clks() takes references with clk_bulk_get_optional() and then
> enables them with clk_bulk_prepare_enable(). If the enable step fails,
> the function returns without dropping the references.
> 
> xpcs_create() handles the failure through out_free_data, which calls
> xpcs_free_data() but never xpcs_clear_clks(), so the clk references are
> leaked.
> 
> Add the missing clk_bulk_put() on the enable failure path. The
> prepare/enable side is already rolled back by
> clk_bulk_prepare_enable() itself.
> 
> Fixes: f6bb3e9d98c2 ("net: pcs: xpcs: Add Synopsys DW xPCS platform device driver")
> Signed-off-by: Coia Prant <coiaprant@gmail.com>

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2026-09-21 15:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-19 17:20 [PATCH net] net: pcs: xpcs: fix clock reference leak on xpcs_init_clks failure Coia Prant
2026-09-21 15:07 ` Simon Horman [this message]
2026-09-22 13:40 ` patchwork-bot+netdevbpf

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=20260921150748.GU13925@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=coiaprant@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fancer.lancer@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 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.