[PATCH v2 0/2] cpufreq: mediatek-hw: Fix initialization resource leaks

From: Haoxiang Li

Date: Thu Nov 19 2026 - 00:29:06 EST


This series fixes two resource cleanup omissions introduced by commit
d776790a5536 ("cpufreq: mediatek-hw: Fix double devm_remap in hotplug case").

Patch 1 releases the resources when the CPUFreq hardware fails to become
enabled.

Following Zhongqiu's suggestion during review, patch 2 handles the
additional failure path where mtk_cpu_create_freq_table() fails after
the registers have been mapped and the memory region requested.
Thanks to Zhongqiu for pointing out this omission and suggesting a
separate fix.

Changes in v2:
- Keep the original hardware enable failure fix unchanged as patch 1.
- Add patch 2 to clean up on frequency table creation failure, using
the same Fixes tag.

Haoxiang Li (2):
cpufreq: mediatek-hw: Release resources when hardware enable fails
cpufreq: mediatek-hw: Clean up on frequency table creation failure

drivers/cpufreq/mediatek-cpufreq-hw.c | 31 ++++++++++++++++-----------
1 file changed, 18 insertions(+), 13 deletions(-)


base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
--
2.25.1