diff options
| author | Biren Pandya <birenpandya@gmail.com> | 2026-06-14 12:45:48 +0530 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-06-29 23:24:46 +0100 |
| commit | fbe67ff37a6fd855a6c097f84f3738bd13d0a898 (patch) | |
| tree | c5732a73d8a206a7cbc18ba0828a9c0f7370795c /include/linux | |
| parent | 44a5fd874bb6873bdaec59f722c1d57832fbc9df (diff) | |
iio: pressure: mpl115: fix runtime PM leak on read error
mpl115_read_raw() takes a runtime PM reference with pm_runtime_get_sync()
before reading the processed pressure or raw temperature, but on the read
error path it returns without calling pm_runtime_put_autosuspend(). Each
failed read therefore leaks a runtime PM reference and prevents the device
from autosuspending.
Drop the reference before checking the return value so both the success
and error paths are balanced.
Fixes: 0c3a333524a3 ("iio: pressure: mpl115: Implementing low power mode by shutdown gpio")
Signed-off-by: Biren Pandya <birenpandya@gmail.com>
Assisted-by: Claude:claude-opus-4-8 coccinelle
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
