diff options
| author | Guangshuo Li <lgs201920130244@gmail.com> | 2026-06-03 20:16:40 +0800 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-06-29 23:24:45 +0100 |
| commit | adf4bc07f814da8329278d32600147f5a150938c (patch) | |
| tree | c3673bd109bac67b11258d400b351b4591ebad73 /rust/zerocopy/git@git.tavy.me:linux-stable.git | |
| parent | 6697091b386a4e2830bdd38512c87a4befff2b32 (diff) | |
iio: adc: ti-ads1119: fix PM reference leak in buffer preenable
ads1119_triggered_buffer_preenable() resumes the device with
pm_runtime_resume_and_get() before starting a conversion.
If i2c_smbus_write_byte() fails, the function returns the error directly
and leaves the runtime PM usage counter elevated. The matching
postdisable callback is not called when preenable fails, so the reference
is leaked and the device may remain runtime-active indefinitely.
Store the I2C transfer result in ret and drop the runtime PM reference on
failure before returning the error.
Fixes: a9306887eba41 ("iio: adc: ti-ads1119: Add driver")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'rust/zerocopy/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
