summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorCong Nguyen <congnt264@gmail.com>2026-08-28 17:59:09 +0700
committerJonathan Cameron <jonathan.cameron@oss.qualcomm.com>2026-08-31 00:52:42 +0100
commit4daa9ca557b4b98ae1ad38a6d1deaa3e31eb8edf (patch)
tree53a446550f8cac445d2aff10298180ee345caa42 /tools/lib/python
parent2a57b9246cecd5dd797a42eb310d6c8816f26d9e (diff)
downloadlinux-next-4daa9ca557b4b98ae1ad38a6d1deaa3e31eb8edf.tar.gz
linux-next-4daa9ca557b4b98ae1ad38a6d1deaa3e31eb8edf.zip
iio: proximity: pulsedlight: fix iio_device left registered on PM setup failure
pm_runtime_set_active() failing in probe() jumps to error_unreg_buffer, which only calls iio_triggered_buffer_cleanup() -- it does not undo the iio_device_register() that already succeeded a few lines above. probe() then returns the error, the devm-managed indio_dev is freed, but the iio core still has it registered: the sysfs/chardev nodes stay live and point at freed memory. Add an error_unreg_dev label that unregisters the iio device before falling through to the existing buffer cleanup, mirroring the teardown order already used in lidar_remove(). Fixes: 4ac4e086fd8c ("iio: pulsedlight-lidar-lite: add runtime PM") Assisted-by: Claude:claude-opus-4 Signed-off-by: Cong Nguyen <congnt264@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions