From: Mark Brown Date: Thu, 24 Feb 2011 17:39:09 +0000 (+0000) Subject: regulator: If we fail when setting up a supply say which supply X-Git-Tag: v2.6.39-rc1~31^2~12 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=23c2f041efa891e6ec0706dc9ad4f776a9aa8c14;p=linux-2.6-block.git 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 Signed-off-by: Liam Girdwood --- diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 9fa20957847d..a2dc6223e8d2 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, ®ulator_list);