Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23c2f041 authored by Mark Brown's avatar Mark Brown Committed by Liam Girdwood
Browse files

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 16c29daf
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2565,9 +2565,12 @@ 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);