aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-24 17:39:09 +0000
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-03-28 13:42:48 -0400
commite4f2724656b1066e5dfa28e9d7c754b3132b713c (patch)
treece5cd61d14913b3a26a09b05ab397f81ee9263a4
parent0e9882b4fb8703f13921279fe4a6592574f92c62 (diff)
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. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> (cherry picked from commit 23c2f041efa891e6ec0706dc9ad4f776a9aa8c14)
-rw-r--r--drivers/regulator/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 9fa20957847..a2dc6223e8d 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -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);