summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAntoniu Miclaus <antoniu.miclaus@analog.com>2026-02-16 11:57:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-19 16:15:30 +0100
commit7a3dec5b265cf87678b10c98a72a435a8e769bb7 (patch)
tree7913b08abde235ac45fa34b070622fad93e6573e /init
parent8f4454d47233cf33290348ddbeb4a6655ee589ec (diff)
iio: gyro: mpu3050-core: fix pm_runtime error handling
commit acc3949aab3e8094641a9c7c2768de1958c88378 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions