In show_cpuinfo(), clk_get() acquires a reference to the CPU clock, but
clk_put() is never called to release it. Since show_cpuinfo() is the
seq_file show callback for /proc/cpuinfo, this causes a clock reference
count leak every time /proc/cpuinfo is read.
The frequency is extracted via clk_get_rate() into a local variable, so
the clock reference can be safely released immediately after.
Fix this by calling clk_put(cpu_clk) right after clk_get_rate().
Fixes: 98f2892607c5 ("ARC: [cpuinfo] Add clk info in /proc/cpuinfo")
Signed-off-by: blaze <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>