From: Jingoo Han Date: Tue, 26 Mar 2013 23:24:57 +0000 (+1100) Subject: drivers-video-backlight-l4f00242t03c-check-return-value-of-regulator_enable-fix X-Git-Tag: next-20130404~3^2~325 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5185761527f49f5292297da67b5c209eaa48546b;p=karo-tx-linux.git 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 --- 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; }