Skip to contentSkip to conversation

backlight: Return proper error in l4f00242t03_probe if regulator_get fails

PATCH In review Axel Lin 2 participants 2 messages Jan 13, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 backlight: Return proper error in l4f00242t03_probe if regulator_get fails

---
 drivers/video/backlight/l4f00242t03.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/video/backlight/l4f00242t03.c +2 -0
index fae421a..6022b67 100644
@@ -190,6 +190,7 @@ static int __devinit l4f00242t03_probe(struct spi_device *spi)
 
 	priv->io_reg = regulator_get(&spi->dev, "vdd");
 	if (IS_ERR(priv->io_reg)) {
+		ret = PTR_ERR(priv->io_reg);
 		dev_err(&spi->dev, "%s: Unable to get the IO regulator\n",
 		       __func__);
 		goto err3;
@@ -197,6 +198,7 @@ static int __devinit l4f00242t03_probe(struct spi_device *spi)
 
 	priv->core_reg = regulator_get(&spi->dev, "vcore");
 	if (IS_ERR(priv->core_reg)) {
+		ret = PTR_ERR(priv->core_reg);
 		dev_err(&spi->dev, "%s: Unable to get the core regulator\n",
 		       __func__);
 		goto err4;
Signature · 1 line
1.7.5.4
Acked-by on v1 1/1
#1 lore raw

Hi Axel,

Quoted 18 lines · Axel Lin
---
 drivers/video/backlight/l4f00242t03.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/video/backlight/l4f00242t03.c +1 -0
index fae421a..6022b67 100644
@@ -190,6 +190,7 @@ static int __devinit l4f00242t03_probe(struct spi_device *spi)
 
 	priv->io_reg = regulator_get(&spi->dev, "vdd");
 	if (IS_ERR(priv->io_reg)) {
+		ret = PTR_ERR(priv->io_reg);
 		dev_err(&spi->dev, "%s: Unable to get the IO regulator\n",
 		       __func__);
 		goto err3;

drivers/video/backlight/l4f00242t03.c static int __devinit l4f00242t03_probe(struct spi_device *spi) · line 204

Quoted 7 lines
drivers/video/backlight/l4f00242t03.c +1 -0
@@ -197,6 +198,7 @@ static int __devinit l4f00242t03_probe(struct spi_device *spi)
 
 	priv->core_reg = regulator_get(&spi->dev, "vcore");
 	if (IS_ERR(priv->core_reg)) {
+		ret = PTR_ERR(priv->core_reg);
 		dev_err(&spi->dev, "%s: Unable to get the core regulator\n",
 		       __func__);
 		goto err4;

Of course, I totally missed them..

Thank you,
Alberto