Re: [PATCH] ARM: mvebu: mvebu-soc-id: fix missing clk_put() on error path

From: Andrew Lunn

Date: Thu Oct 08 2026 - 14:09:04 EST


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