aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5baa1965aa1..ba40497b522 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1183,6 +1183,9 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev,
struct regulator_dev *r;
struct device_node *node;
+ if (supply == NULL)
+ return NULL;
+
/* first do a dt based lookup */
if (dev && dev->of_node) {
node = of_get_regulator(dev, supply);