summaryrefslogtreecommitdiff
path: root/scripts/rt-tester/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorAntoniu Miclaus <antoniu.miclaus@analog.com>2026-02-16 11:57:56 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2026-02-23 08:24:39 +0000
commitacc3949aab3e8094641a9c7c2768de1958c88378 (patch)
tree5e2b7a92f9a65573facda60dd47f763d04a4ea4f /scripts/rt-tester/git@git.tavy.me:linux.git
parent91f950b4cbb1aa9ea4eb3999f1463e8044b717fb (diff)
iio: gyro: mpu3050-core: fix pm_runtime error handling
The return value of pm_runtime_get_sync() is not checked, allowing the driver to access hardware that may fail to resume. The device usage count is also unconditionally incremented. Use pm_runtime_resume_and_get() which propagates errors and avoids incrementing the usage count on failure. In preenable, add pm_runtime_put_autosuspend() on set_8khz_samplerate() failure since postdisable does not run when preenable fails. Fixes: 3904b28efb2c ("iio: gyro: Add driver for the MPU-3050 gyroscope") Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'scripts/rt-tester/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions