diff options
author | Axel Lin <[email protected]> | 2012-01-20 14:34:06 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-01-23 08:38:48 -0800 |
commit | d59d9ebaacba32b63f24d53b1463519b445b4683 (patch) | |
tree | b88e1c825a707558d0e9171a87df9712e27bcb9e | |
parent | 36c3e75907c8cb515fad260190ca1beb7e53df96 (diff) |
drivers/video/backlight/l4f00242t03.c: return proper error in l4f00242t03_probe if regulator_get() fails
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Alberto Panizzo <[email protected]>
Cc: Richard Purdie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | drivers/video/backlight/l4f00242t03.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c index 4f5d1c4cb6ab..27d1d7a29c77 100644 --- a/drivers/video/backlight/l4f00242t03.c +++ b/drivers/video/backlight/l4f00242t03.c @@ -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; |