Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c93609ab authored by Mark Brown's avatar Mark Brown
Browse files

regulator: core: Allow dummy regulators for supplies



Rather than just not resolving the supply when there is explicitly no
supply mapping fall through and allow a dummy supply to be substituted.
This fixes issues with constant retries reported by Dong Aisheng.

Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Tested-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
parent 43fc99f2
Loading
Loading
Loading
Loading
+0 −8
Original line number Original line Diff line number Diff line
@@ -1532,14 +1532,6 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
	if (IS_ERR(r)) {
	if (IS_ERR(r)) {
		ret = PTR_ERR(r);
		ret = PTR_ERR(r);


		if (ret == -ENODEV) {
			/*
			 * No supply was specified for this regulator and
			 * there will never be one.
			 */
			return 0;
		}

		/* Did the lookup explicitly defer for us? */
		/* Did the lookup explicitly defer for us? */
		if (ret == -EPROBE_DEFER)
		if (ret == -EPROBE_DEFER)
			return ret;
			return ret;