diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-10-13 13:06:49 +0100 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2009-12-17 10:27:23 +0000 |
commit | 5b307627738f1f6cbc31fad9e28a299b5fe55602 (patch) | |
tree | 7fdf056fcf0079b12b0ae04c4c17a0b4ff9ceab6 | |
parent | be0e2d3e802908e2a3ca620ba8f49ecab87982b2 (diff) | |
download | kernel_samsung_smdk4412-5b307627738f1f6cbc31fad9e28a299b5fe55602.zip kernel_samsung_smdk4412-5b307627738f1f6cbc31fad9e28a299b5fe55602.tar.gz kernel_samsung_smdk4412-5b307627738f1f6cbc31fad9e28a299b5fe55602.tar.bz2 |
regulator: Report error codes for bulk operations
If we're going to log an error we may as well log what the error
code that we're failing on is.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r-- | drivers/regulator/core.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index efe568d..9b43dab 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1885,9 +1885,9 @@ int regulator_bulk_get(struct device *dev, int num_consumers, consumers[i].consumer = regulator_get(dev, consumers[i].supply); if (IS_ERR(consumers[i].consumer)) { - dev_err(dev, "Failed to get supply '%s'\n", - consumers[i].supply); ret = PTR_ERR(consumers[i].consumer); + dev_err(dev, "Failed to get supply '%s': %d\n", + consumers[i].supply, ret); consumers[i].consumer = NULL; goto err; } @@ -1930,7 +1930,7 @@ int regulator_bulk_enable(int num_consumers, return 0; err: - printk(KERN_ERR "Failed to enable %s\n", consumers[i].supply); + printk(KERN_ERR "Failed to enable %s: %d\n", consumers[i].supply, ret); for (i = 0; i < num_consumers; i++) regulator_disable(consumers[i].consumer); @@ -1965,7 +1965,8 @@ int regulator_bulk_disable(int num_consumers, return 0; err: - printk(KERN_ERR "Failed to disable %s\n", consumers[i].supply); + printk(KERN_ERR "Failed to disable %s: %d\n", consumers[i].supply, + ret); for (i = 0; i < num_consumers; i++) regulator_enable(consumers[i].consumer); |