backlight: Return proper error in l4f00242t03_probe if regulator_get fails
Subsystems (2)
PATCH 1/1 backlight: Return proper error in l4f00242t03_probe if regulator_get fails
Signed-off-by Axel Lin <[email protected]>
--- drivers/video/backlight/l4f00242t03.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/video/backlight/l4f00242t03.c +2 -0
@@ -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
Hi Axel,
Quoted 18 lines · Axel Lin
Signed-off-by Axel Lin <[email protected]>--- drivers/video/backlight/l4f00242t03.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/video/backlight/l4f00242t03.c +1
-0@@ -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..
Acked-by Alberto Panizzo <[email protected]>
Thank you,
Alberto