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: Mark Brown <broonie@kernel.org>
Tested-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
This commit is contained in:
Mark Brown 2017-04-11 21:31:40 +01:00
parent 43fc99f293
commit c93609ab39

View file

@ -1532,14 +1532,6 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
if (IS_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? */
if (ret == -EPROBE_DEFER)
return ret;