Re: [PATCH] iio: imu: fix unbalanced regulator_disable calls, when probe fails

From: Andy Shevchenko

Date: Sun Mar 08 2026 - 16:40:16 EST


On Sun, Mar 08, 2026 at 02:03:28PM +0300, Andrey Skvortsov wrote:
> During a probe functions after all regulators are enabled, runtime pm
> is enabled. Before probe function finishes, runtime pm triggers and
> disables vddio regulator. When probe function fails after that,
> inv_mpu_core_disable_regulator_action tries to disable already
> disabled by runtime pm vddio regulator causing following backtrace:
>
> inv-mpu6050-i2c 1-0068: trigger probe fail -19
> ------------[ cut here ]------------

Read Submitting Patches documentation (the section about backtraces
in the commit messages) and act accordingly in the next version.

> unbalanced disables a for vcc-dsi-sensor
> WARNING: drivers/regulator/core.c:3244 at _regulator_disable+0x118/0x260, CPU#3: (udev-worker)/357

--
With Best Regards,
Andy Shevchenko