device_get_supply_regulator() returns -ENOENT, not -ENODEV when no supply exists. This fixes the probe on i.MX7D.
Signed-off-by: Nora Schiffer <[email protected]> --- drivers/power/regulator/anatop_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/regulator/anatop_regulator.c b/drivers/power/regulator/anatop_regulator.c index 88570a1f624..68a320bd0f8 100644 --- a/drivers/power/regulator/anatop_regulator.c +++ b/drivers/power/regulator/anatop_regulator.c @@ -176,7 +176,7 @@ static int anatop_regulator_probe(struct udevice *dev) ret = device_get_supply_regulator(dev, "vin-supply", &anatop_reg->supply); - if (ret != -ENODEV) { + if (ret != -ENOENT) { if (ret) return log_msg_ret("get vin-supply", ret); -- 2.55.0
