summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/stpmic1_regulator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c
index 71a4ae80c3..2b4b729541 100644
--- a/drivers/regulator/stpmic1_regulator.c
+++ b/drivers/regulator/stpmic1_regulator.c
@@ -383,6 +383,11 @@ static int stpmic1_regulator_register(struct device_d *dev, int id,
{
int ret;
+ if (!match->of_node) {
+ dev_dbg(dev, "Skip missing DTB regulator %s", match->name);
+ return 0;
+ }
+
cfg->dev = dev;
cfg->rdev.desc = &cfg->desc;
cfg->rdev.regmap = dev_get_regmap(dev->parent, NULL);