]> Gentwo Git Trees - linux/.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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 10 Sep 2025 10:49:52 +0000 (12:49 +0200)
commitcdc06f912670c8c199d5fa9e78b64b7ed8e871d0
tree191f58cde559f4be97957f5a77e15c2d4f042e18
parent91418337a27d800b33d6d391f565b1fa2c7ff75c
cpuidle: qcom-spm: fix device and OF node leaks at probe

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>
drivers/cpuidle/cpuidle-qcom-spm.c