]> 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>
Tue, 26 Mar 2013 23:24:57 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:12:24 +0000 (17:12 +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;
        }