From 5185761527f49f5292297da67b5c209eaa48546b Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Wed, 27 Mar 2013 10:24:57 +1100 Subject: [PATCH] drivers-video-backlight-l4f00242t03c-check-return-value-of-regulator_enable-fix - Added regulator_disable() for IO regulator before returning Signed-off-by: Jingoo Han Signed-off-by: Andrew Morton --- drivers/video/backlight/l4f00242t03.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c index 8d54c3c10807..a35a38c709cf 100644 --- a/drivers/video/backlight/l4f00242t03.c +++ b/drivers/video/backlight/l4f00242t03.c @@ -69,11 +69,13 @@ static void l4f00242t03_lcd_init(struct spi_device *spi) ret = regulator_set_voltage(priv->core_reg, 2800000, 2800000); if (ret) { dev_err(&spi->dev, "failed to set the core regulator voltage.\n"); + regulator_disable(priv->io_reg); return; } ret = regulator_enable(priv->core_reg); if (ret) { dev_err(&spi->dev, "failed to enable the core regulator.\n"); + regulator_disable(priv->io_reg); return; } -- 2.39.5