summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBiren Pandya <birenpandya@gmail.com>2026-06-14 12:45:49 +0530
committerJonathan Cameron <jic23@kernel.org>2026-06-29 23:24:46 +0100
commit38b72267b7e22768a1f26d9935de4e1752a1dc85 (patch)
tree9c8bde02634216e390dcd3ffc9c52ace7977e045 /include/linux
parentfbe67ff37a6fd855a6c097f84f3738bd13d0a898 (diff)
iio: light: gp2ap002: fix runtime PM leak on read error
gp2ap002_read_raw() calls pm_runtime_get_sync() before reading the lux value, but if gp2ap002_get_lux() fails, it returns directly. This skips the pm_runtime_put_autosuspend() call at the "out" label, permanently leaking a runtime PM reference and preventing the device from autosuspending. Replace the direct return with a "goto out" to ensure the reference is properly dropped on the error path. Fixes: f6dbf83c17cb ("iio: light: gp2ap002: Take runtime PM reference on light read") Signed-off-by: Biren Pandya <birenpandya@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions