drivers: iio: mpu3050: use dev_err_probe for regulator request
Subsystems (2)
cover drivers: iio: mpu3050: use dev_err_probe for regulator request
Regulator requesting may result in deferred probing error which will abort driver probing. To avoid this just use dev_err_probe which handles deferred probing.
Addresses this situation:
[ 2.250875] mpu3050-i2c 2-0068: Cannot get regulators
Svyatoslav Ryhel (1):
drivers: iio: mpu3050: use dev_err_probe for regulator request
drivers/iio/gyro/mpu3050-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Signature · 1 line
2.51.0
PATCH 1/1 drivers: iio: mpu3050: use dev_err_probe for regulator request
Regulator requesting may result in deferred probing error which will abort driver probing. To avoid this just use dev_err_probe which handles deferred probing.
--- drivers/iio/gyro/mpu3050-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/iio/gyro/mpu3050-core.c +2 -4
@@ -1162,10 +1162,8 @@ int mpu3050_common_probe(struct device *dev, mpu3050->regs[1 ].supply = mpu3050_reg_vlogic; ret =devm_regulator_bulk_get (dev,ARRAY_SIZE (mpu3050->regs), mpu3050->regs); -if (ret) { -dev_err (dev,"Cannot get regulators\n" ); -return ret; - } +if (ret) +return dev_err_probe (dev, ret,"Cannot get regulators\n" ); ret =mpu3050_power_up (mpu3050);if (ret)
Signature · 1 line
2.51.0
Quoted 3 lines · Svyatoslav Ryhel
Regulator requesting may result in deferred probing error which will abort driver probing. To avoid this just use
dev_err_probewhich handles deferred probing.
I believe this deserves a Fixes tag.
Anyway, the rest LGTM,
Signature · 2 lines
With Best Regards, Andy Shevchenko
Jonathan Cameron
maintainerQuoted 10 lines · On Thu, 22 Jan 2026 17:58:41 +0200 Andy Shevchenko…
Quoted 3 lines · Svyatoslav Ryhel
Regulator requesting may result in deferred probing error which will abort driver probing. To avoid this just use
dev_err_probewhich handles deferred probing.I believe this deserves a Fixes tag.
Anyway, the rest LGTM,
Reviewed-by Andy Shevchenko <[email protected]>
Added one. It goes all the way back to:3904b28efb2c ("iio: gyro: Add driver for the MPU-3050 gyroscope") in 2016.
Given age of issue and timing I've queued this for the next merge window.
Thanks,
Jonathan