Skip to content

iio: gyro: mpu3050: fix pm_runtime error handling

Antoniu Miclaus linux-iio lkml 2 versions – Applied

Status from this message: Applied to the fixes-togreg branch of iio.git and marked for

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 1 replyApplied
  2. v32 patches 6 repliesSuperseded

Changes in v4 from the cover letter

- Reword commit messages to correctly attribute the unchecked return value to the caller rather than pm_runtime_get_sync() itself
- Simplify preenable by collapsing the trailing return statements

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2iio: gyro: mpu3050-i2c: fix pm_runtime error handlingdrivers/iio/gyro/mpu3050-i2c.c+1 -20 replies
2/2iio: gyro: mpu3050-core: fix pm_runtime error handlingdrivers/iio/gyro/mpu3050-core.c+13 -50 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchLinus Walleij
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] iio: gyro: mpu3050: fix pm_runtime error handling

Fix pm_runtime error handling across the mpu3050 driver. The existing code uses pm_runtime_get_sync() without checking return values, allowing operations to proceed even when the device fails to resume.

Replace pm_runtime_get_sync() with pm_runtime_resume_and_get() and propagate errors appropriately. Unlike pm_runtime_get_sync(), the usage count is not incremented on error.

Changes in v4:
- Reword commit messages to correctly attribute the unchecked return value to the caller rather than pm_runtime_get_sync() itself
- Simplify preenable by collapsing the trailing return statements

Antoniu Miclaus (2):
iio: gyro: mpu3050-i2c: fix pm_runtime error handling
iio: gyro: mpu3050-core: fix pm_runtime error handling

 drivers/iio/gyro/mpu3050-core.c | 18 +++++++++++++-----
 drivers/iio/gyro/mpu3050-i2c.c  |  3 +--
 2 files changed, 14 insertions(+), 7 deletions(-)
Signature · 1 line
2.43.0