]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: gyro: mpu3050-i2c: fix pm_runtime error handling
authorAntoniu Miclaus <antoniu.miclaus@analog.com>
Mon, 16 Feb 2026 09:57:55 +0000 (11:57 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 23 Feb 2026 08:24:38 +0000 (08:24 +0000)
commit91f950b4cbb1aa9ea4eb3999f1463e8044b717fb
treea3dbbe71798f1ca24f6c07a39a703f4ebd9e7d13
parentdd6183e42719cc54057579b8e6be5348cecfeda7
iio: gyro: mpu3050-i2c: fix pm_runtime error handling

The return value of pm_runtime_get_sync() is not checked, and the
function always returns success. This allows I2C mux operations to
proceed even when the device fails to resume.

Use pm_runtime_resume_and_get() and propagate its return value to
properly handle resume failures.

Fixes: 3904b28efb2c ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/gyro/mpu3050-i2c.c