Skip to contentSkip to conversation

regulator: If we fail when setting up a supply say which supply

PATCH Applied Mark Brown 2 participants 2 messages Feb 24, 2011 – Feb 25, 2011 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regulator: If we fail when setting up a supply say which supply

Makes it a bit easier to identify if it's a problem with the supplies, the usual error would be omitting the supply name entirely.

---
 drivers/regulator/core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/regulator/core.c +4 -1
index 9fa2095..a2dc622 100644
@@ -2565,8 +2565,11 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
 			init_data->consumer_supplies[i].dev,
 			init_data->consumer_supplies[i].dev_name,
 			init_data->consumer_supplies[i].supply);
-		if (ret < 0)
+		if (ret < 0) {
+			dev_err(dev, "Failed to set supply %s\n",
+				init_data->consumer_supplies[i].supply);
 			goto unset_supplies;
+		}
 	}
 
 	list_add(&rdev->list, &regulator_list);
Signature · 1 line
1.7.2.3
#1 lore raw
Quoted 7 lines · Mark Brown

Makes it a bit easier to identify if it's a problem with the supplies, the usual error would be omitting the supply name entirely.

---
 drivers/regulator/core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Applied.

Thanks

Liam