]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpuidle: qcom-spm: fix device and OF node leaks at probe
authorJohan Hovold <johan@kernel.org>
Mon, 8 Sep 2025 15:22:12 +0000 (17:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:28 +0000 (11:56 +0200)
commita969261609abb7bc870872321d5418e339e5cc49
tree759a81d603d1affad8d353a7e0b4ac98feac6f1c
parentf3dc08ddf0f66044e622b045b260a800a6b0df3e
cpuidle: qcom-spm: fix device and OF node leaks at probe

[ Upstream commit cdc06f912670c8c199d5fa9e78b64b7ed8e871d0 ]

Make sure to drop the reference to the saw device taken by
of_find_device_by_node() after retrieving its driver data during
probe().

Also drop the reference to the CPU node sooner to avoid leaking it in
case there is no saw node or device.

Fixes: 60f3692b5f0b ("cpuidle: qcom_spm: Detach state machine from main SPM handling")
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpuidle/cpuidle-qcom-spm.c