[PATCH] microblaze: CCF: fix refcount leak

From: Alexander A. Klimov

Date: Tue May 26 2026 - 14:44:23 EST


Every value returned from of_clk_get() is supposed to be cleaned up
via clk_put() once not needed anymore.

Fixes: c1120542b99a ("microblaze: Add support for CCF")
Signed-off-by: Alexander A. Klimov <grandmaster@xxxxxxxxxxxx>
---
arch/microblaze/kernel/cpu/cpuinfo.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c
index cd9b4450763b..32c508e85408 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo.c
@@ -133,6 +133,7 @@ void __init setup_cpuinfo_clk(void)
cpuinfo.cpu_clock_freq = fcpu(cpu, "timebase-frequency");
} else {
cpuinfo.cpu_clock_freq = clk_get_rate(clk);
+ clk_put(clk);
}

if (!cpuinfo.cpu_clock_freq) {
--
2.54.0