aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/fixed.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-08-03 13:49:53 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2009-09-22 08:32:40 -0400
commitc53ad7fe5759cea10137c9e176d14f8c8f22d286 (patch)
tree9cd36b10a8176065f59fb913f56d41c38ff24f94 /drivers/regulator/fixed.c
parentc6db182822e292575b5beb56c003e95f616407f4 (diff)
regulator: More explict error reporting for fixed regulator
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/fixed.c')
-rw-r--r--drivers/regulator/fixed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index cdc674fb46c3..9c7f956d57c4 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -70,12 +70,14 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev)
70 70
71 drvdata = kzalloc(sizeof(struct fixed_voltage_data), GFP_KERNEL); 71 drvdata = kzalloc(sizeof(struct fixed_voltage_data), GFP_KERNEL);
72 if (drvdata == NULL) { 72 if (drvdata == NULL) {
73 dev_err(&pdev->dev, "Failed to allocate device data\n");
73 ret = -ENOMEM; 74 ret = -ENOMEM;
74 goto err; 75 goto err;
75 } 76 }
76 77
77 drvdata->desc.name = kstrdup(config->supply_name, GFP_KERNEL); 78 drvdata->desc.name = kstrdup(config->supply_name, GFP_KERNEL);
78 if (drvdata->desc.name == NULL) { 79 if (drvdata->desc.name == NULL) {
80 dev_err(&pdev->dev, "Failed to allocate supply name\n");
79 ret = -ENOMEM; 81 ret = -ENOMEM;
80 goto err; 82 goto err;
81 } 83 }
@@ -90,6 +92,7 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev)
90 config->init_data, drvdata); 92 config->init_data, drvdata);
91 if (IS_ERR(drvdata->dev)) { 93 if (IS_ERR(drvdata->dev)) {
92 ret = PTR_ERR(drvdata->dev); 94 ret = PTR_ERR(drvdata->dev);
95 dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
93 goto err_name; 96 goto err_name;
94 } 97 }
95 98