]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers-video-backlight-l4f00242t03c-check-return-value-of-regulator_enable-fix
authorJingoo Han <jg1.han@samsung.com>
Wed, 20 Mar 2013 04:07:38 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:34:00 +0000 (16:34 +1100)
- Added regulator_disable() for IO regulator before returning

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/backlight/l4f00242t03.c

index 8d54c3c10807fc790d704240c69f96e70b957244..a35a38c709cf03753a717c8be86d14aae982bcc6 100644 (file)
@@ -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;
        }