Skip to contentSkip to conversation

regulator: Report regulator_get() failure in virtual consumer

PATCH Applied Mark Brown 2 participants 2 messages Jun 15, 2009 – Jun 16, 2009 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regulator: Report regulator_get() failure in virtual consumer

The core will no longer complain so we should log an error here.

---
 drivers/regulator/virtual.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/regulator/virtual.c +2 -0
index e7db566..e953c18 100644
@@ -285,6 +285,8 @@ static int regulator_virtual_consumer_probe(struct platform_device *pdev)
 	drvdata->regulator = regulator_get(&pdev->dev, reg_id);
 	if (IS_ERR(drvdata->regulator)) {
 		ret = PTR_ERR(drvdata->regulator);
+		dev_err(&pdev->dev, "Failed to obtain supply '%s': %d\n",
+			reg_id, ret);
 		goto err;
 	}
 
Signature · 1 line
1.6.3.1
#1 lore raw
Quoted 12 lines · Mark Brown

The core will no longer complain so we should log an error here.

---
 drivers/regulator/virtual.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/regulator/virtual.c +0 -0
index e7db566..e953c18 100644

drivers/regulator/virtual.c static int regulator_virtual_consumer_probe(struct platform_device *pdev) · line 292

Quoted 8 lines
drivers/regulator/virtual.c +2 -0
@@ -285,6 +285,8 @@ static int regulator_virtual_consumer_probe(struct platform_device *pdev)
 	drvdata->regulator = regulator_get(&pdev->dev, reg_id);
 	if (IS_ERR(drvdata->regulator)) {
 		ret = PTR_ERR(drvdata->regulator);
+		dev_err(&pdev->dev, "Failed to obtain supply '%s': %d\n",
+			reg_id, ret);
 		goto err;
 	}
 

Applied.

Thanks

Liam