lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260205-inv-icm45600-fix-regulator-put-warning-v1-1-314ec12512cb@tdk.com>
Date: Thu, 05 Feb 2026 14:35:33 +0100
From: Jean-Baptiste Maneyrol via B4 Relay <devnull+jean-baptiste.maneyrol.tdk.com@...nel.org>
To: Remi Buisson <remi.buisson@....com>, 
 Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>, 
 Nuno Sá <nuno.sa@...log.com>, 
 Andy Shevchenko <andy@...nel.org>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>, 
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@....com>, 
 stable@...r.kernel.org
Subject: [PATCH] iio: imu: inv_icm45600: fix regulator put warning when
 probe fails

From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@....com>

When the driver probe fails we encounter a regulator put warning
because vddio regulator is not stopped before release. The issue
comes from pm_runtime not already setup when core probe fails and
the vddio regulator disable callback is called.

Fix the issue by deleting pm_runtime check in the vddio regulator
disable callback and handing over the vddio disable management to
pm_runtime by deleting the disable remove action before setting up
pm_runtime.

Fixes: 7ff021a3faca ("iio: imu: inv_icm45600: add new inv_icm45600 driver")
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@....com>
Cc: stable@...r.kernel.org
---
 drivers/iio/imu/inv_icm45600/inv_icm45600_core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c b/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
index ab1cb7b9dba435a3280e50ab77cd16e903c7816c..18d613a025cb4f9cbb8d73f27a46fc1207f5820d 100644
--- a/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
+++ b/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
@@ -676,10 +676,6 @@ static int inv_icm45600_enable_regulator_vddio(struct inv_icm45600_state *st)
 static void inv_icm45600_disable_vddio_reg(void *_data)
 {
 	struct inv_icm45600_state *st = _data;
-	struct device *dev = regmap_get_device(st->map);
-
-	if (pm_runtime_status_suspended(dev))
-		return;
 
 	regulator_disable(st->vddio_supply);
 }
@@ -780,6 +776,8 @@ int inv_icm45600_core_probe(struct regmap *regmap, const struct inv_icm45600_chi
 	if (ret)
 		return ret;
 
+	/* hand over vddio management to pm_runtime */
+	devm_remove_action(dev, inv_icm45600_disable_vddio_reg, st);
 	pm_runtime_get_noresume(dev);
 	pm_runtime_set_autosuspend_delay(dev, 2 * USEC_PER_MSEC);
 	pm_runtime_use_autosuspend(dev);

---
base-commit: d820183f371d9aa8517a1cd21fe6edacf0f94b7f
change-id: 20260205-inv-icm45600-fix-regulator-put-warning-7c45a49c4c53

Best regards,
-- 
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@....com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ