mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Haotian Zhang <vulab@iscas.ac.cn>
Cc: Gregory Clement <gregory.clement@bootlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	Jason Cooper <jason@lakedaemon.net>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: mvebu: mvebu-soc-id: fix missing clk_put() on error path
Date: Thu, 8 Oct 2026 20:08:46 +0200	[thread overview]
Message-ID: <1d32e115-17c4-4bd2-9689-907ac8f324df@lunn.ch> (raw)
In-Reply-To: <20261008171410.2717704-1-vulab@iscas.ac.cn>

On Fri, Oct 09, 2026 at 01:14:10AM +0800, Haotian Zhang wrote:
> get_soc_id_by_pci() takes a reference on the PCIe clock with
> of_clk_get_by_name(), but when clk_prepare_enable() fails it jumps to
> the clk_err label, which only drops the device node references and never
> calls clk_put(). The struct clk and the clock core reference it holds
> are leaked on that error path.

	/*
	 * If the PCIe unit is actually enabled and we have PCI
	 * support in the kernel, we intentionally do not release the
	 * reference to the clock.
...

Given this comment, you need more detail in the commit message to
explain how your change and this comment goes together.

    Andrew

---
pw-bot: cr

      reply	other threads:[~2026-10-08 18:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 17:14 Haotian Zhang
2026-10-08 18:08 ` Andrew Lunn [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=1d32e115-17c4-4bd2-9689-907ac8f324df@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=gregory.clement@bootlin.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=vulab@iscas.ac.cn \
    /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

all inboxes | Powered by JetHome®