public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: jean-baptiste.maneyrol@tdk.com
Cc: "Remi Buisson" <remi.buisson@tdk.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] iio: imu: inv_icm45600: fix regulator put warning when probe fails
Date: Thu, 5 Feb 2026 18:19:35 +0200	[thread overview]
Message-ID: <aYTDF9BNwzXmd2J8@smile.fi.intel.com> (raw)
In-Reply-To: <20260205-inv-icm45600-fix-regulator-put-warning-v1-1-314ec12512cb@tdk.com>

On Thu, Feb 05, 2026 at 02:35:33PM +0100, Jean-Baptiste Maneyrol via B4 Relay wrote:

> 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.

...

> +	/* hand over vddio management to pm_runtime */
> +	devm_remove_action(dev, inv_icm45600_disable_vddio_reg, st);

First of all, note "remove" vs. "release". Have you tried to remove and insert
module several times? Does kmemleak happy about this?

Second, calling devm_*() for release resources is very exceptional situation.
This usually means that something is wrong to begin with in the probe.

Can you find a better way without calling devm_*() for releasing resources?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-02-05 16:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 13:35 [PATCH] iio: imu: inv_icm45600: fix regulator put warning when probe fails Jean-Baptiste Maneyrol via B4 Relay
2026-02-05 16:19 ` Andy Shevchenko [this message]
2026-02-05 17:19   ` Jean-Baptiste Maneyrol
2026-02-05 19:26     ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYTDF9BNwzXmd2J8@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jean-baptiste.maneyrol@tdk.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=remi.buisson@tdk.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox