Skip to content

Commit

Permalink
drivers/video/backlight/l4f00242t03.c: return proper error in l4f0024…
Browse files Browse the repository at this point in the history
…2t03_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]>
  • Loading branch information
AxelLin authored and torvalds committed Jan 23, 2012
1 parent 36c3e75 commit d59d9eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/video/backlight/l4f00242t03.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,15 @@ 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;
}

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;
Expand Down

0 comments on commit d59d9eb

Please sign in to comment.