Re: [PATCH 2/2] regulator: assert that dummy regulator has been probed before using it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux