diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index a31b6ae92a84..7fd793d8536c 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1381,6 +1381,12 @@ static int set_machine_constraints(struct regulator_dev *rdev) * and we have control then make sure it is enabled. */ if (rdev->constraints->always_on || rdev->constraints->boot_on) { + /* If we want to enable this regulator, make sure that we know + * the supplying regulator. + */ + if (rdev->supply_name && !rdev->supply) + return -EPROBE_DEFER; + if (rdev->supply) { ret = regulator_enable(rdev->supply); if (ret < 0) {