[PATCH v2 0/2] iio: gyro: mpu3050: Fix runtime PM refcount leak in trigger enable path
From: laixiangwu
Date: Sun Nov 01 2026 - 04:24:25 EST
Hi Jonathan,
Thanks for the review comments on the first version.
This is a rework of the runtime PM refcount fix for the mpu3050 data
ready trigger, following the review feedback:
- Patch 1 is a new precursor patch that splits the enable and disable
paths out of mpu3050_drdy_trigger_set_state() into a pair of
separate helpers. It is a pure code move with no functional change.
- Patch 2 then applies the fix on top of the refactor, so the error
label now only lives inside mpu3050_drdy_trigger_enable(), and it
uses pm_runtime_resume_and_get() instead of pm_runtime_get_sync(),
which keeps the usage counter balanced even when the resume fails.
laixiangwu (2):
iio: gyro: mpu3050: Split data ready trigger enable/disable into
helpers
iio: gyro: mpu3050: Fix runtime PM refcount leak in trigger enable
path
drivers/iio/gyro/mpu3050-core.c | 182 +++++++++++++++++++-------------
1 file changed, 108 insertions(+), 74 deletions(-)