]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cpufreq: mediatek: fix device leak on probe failure
authorJohan Hovold <johan@kernel.org>
Tue, 9 Sep 2025 07:38:19 +0000 (09:38 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 29 Sep 2025 09:10:46 +0000 (14:40 +0530)
commitebc4ed14a4dbf51307102bb7ffc82ed6c16a37c2
tree11e8953abcb32fa34f2dda131096f1e8f1d0e27b
parent3e681899cc6e6c77eca55dd8c7cc57b27868e8a2
cpufreq: mediatek: fix device leak on probe failure

Make sure to drop the reference to the cci device taken by
of_find_device_by_node() on probe failure (e.g. probe deferral).

Fixes: 0daa47325bae ("cpufreq: mediatek: Link CCI device to CPU")
Cc: Jia-Wei Chang <jia-wei.chang@mediatek.com>
Cc: Rex-BC Chen <rex-bc.chen@mediatek.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/mediatek-cpufreq.c