Skip to contentSkip to conversation

power: pmic: tps65219: fail if regulators node is missing

PATCH New Kumara Bhimeswararao Matsa 1 participant 1 message Jul 29

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: pmic: tps65219: fail if regulators node is missing

The TPS65219 bind function continues when the regulators subnode is missing. This causes pmic_bind_children() to be called with an invalid ofnode and permits a misleading message indicating that the subnode was found.

Return -ENXIO when the regulators subnode is absent, matching the behavior of other TI PMIC drivers.

---
 drivers/power/pmic/tps65219.c | 1 +
 1 file changed, 1 insertion(+)
drivers/power/pmic/tps65219.c +1 -0
index 0716af027a3..1fecde84795 100644
@@ -55,6 +55,7 @@ static int tps65219_bind(struct udevice *dev)
 	if (!ofnode_valid(regulators_node)) {
 		debug("%s: %s regulators subnode not found!\n", __func__,
 		      dev->name);
+		return -ENXIO;
 	}
 
 	debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
Signature · 1 line
2.43.0