mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Christian Eggers <ceggers@arri.de>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Douglas Anderson <dianders@chromium.org>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 2/2] regulator: assert that dummy regulator has been probed before using it
Date: Mon, 10 Mar 2025 17:23:02 +0000	[thread overview]
Message-ID: <3d195bf7-de99-4fe9-87b0-291e156f083c@sirena.org.uk> (raw)
In-Reply-To: <20250310163302.15276-2-ceggers@arri.de>

[-- Attachment #1: Type: text/plain, Size: 628 bytes --]

On Mon, Mar 10, 2025 at 05:33:02PM +0100, Christian Eggers wrote:
> Due to asynchronous driver probing there is a chance that the dummy
> regulator hasn't already been probed when first accessing it.

>  		if (have_full_constraints()) {
>  			r = dummy_regulator_rdev;
> +			BUG_ON(!r);
>  			get_device(&r->dev);
>  		} else {
>  			dev_err(dev, "Failed to resolve %s-supply for %s\n",
> @@ -2086,6 +2087,7 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
>  			goto out;
>  		}
>  		r = dummy_regulator_rdev;
> +		BUG_ON(!r);

This doesn't actually help anything - I'd expect this to trigger probe
deferral.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2025-03-10 17:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10 16:33 [PATCH 1/2] regulator: dummy: force synchronous probing Christian Eggers
2025-03-10 16:33 ` [PATCH 2/2] regulator: assert that dummy regulator has been probed before using it Christian Eggers
2025-03-10 17:23   ` Mark Brown [this message]
2025-03-10 18:22     ` Christian Eggers
2025-03-10 19:39       ` Mark Brown

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=3d195bf7-de99-4fe9-87b0-291e156f083c@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=ceggers@arri.de \
    --cc=dianders@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®