7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wentao Liang [ Upstream commit 52d4d1b26a5bc64de95099d0a3dd8b90dba1f3a3 ] imx_obtain_fixed_clock_hw() obtains the clock through imx_obtain_fixed_clock_from_dt(), which creates a consumer reference via of_clk_get_from_provider(). The reference is discarded right after __clk_get_hw() returns the hardware pointer, leaking it. Keep the imx_clk_fixed() fallback unchanged and drop the DT-obtained consumer reference with clk_put() once the hardware pointer has been extracted. Fixes: a4a4069f4523 ("clk: imx: Add imx_obtain_fixed_clock clk_hw based variant") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20260915055631.1730231-1-vulab@iscas.ac.cn Signed-off-by: Abel Vesa Signed-off-by: Sasha Levin --- drivers/clk/imx/clk.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c index e113e30514fa2..49e51e949f71d 100644 --- a/drivers/clk/imx/clk.c +++ b/drivers/clk/imx/clk.c @@ -95,11 +95,16 @@ struct clk_hw *imx_obtain_fixed_clock_hw( const char *name, unsigned long rate) { struct clk *clk; + struct clk_hw *hw; clk = imx_obtain_fixed_clock_from_dt(name); if (IS_ERR(clk)) - clk = imx_clk_fixed(name, rate); - return __clk_get_hw(clk); + return __clk_get_hw(imx_clk_fixed(name, rate)); + + hw = __clk_get_hw(clk); + clk_put(clk); + + return hw; } struct clk_hw *imx_obtain_fixed_of_clock(struct device_node *np, -- 2.53.0