OMAP: DSS2: PicoDLP: fix error handling in power_on
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 23 Jun 2011 13:36:36 +0000 (16:36 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 14 Sep 2011 15:08:23 +0000 (18:08 +0300)
Fix two problems in PicoDLP driver's error handling on
picodlp_panel_power_on:

- If omapdss_dpi_display_enable() failed, the its error value was not
  returned
- If picodlp_i2c_init() failed, dssdev->state was erroneously set to
  OMAP_DSS_DISPLAY_ACTIVE

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/displays/panel-picodlp.c

index b663e60e1a11773327f64b4ca6eccb1b8668c1e2..f0a51f49e48c7c6aee8c4064336bf2129e65d0a6 100644 (file)
@@ -370,16 +370,18 @@ static int picodlp_panel_power_on(struct omap_dss_device *dssdev)
         * then only i2c commands can be successfully sent to dpp2600
         */
        msleep(1000);
-       if (omapdss_dpi_display_enable(dssdev)) {
+       r = omapdss_dpi_display_enable(dssdev);
+       if (r) {
                dev_err(&dssdev->dev, "failed to enable DPI\n");
                goto err1;
        }
-       dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
 
        r = picodlp_i2c_init(picod->picodlp_i2c_client);
        if (r)
                goto err;
 
+       dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+
        return r;
 err:
        omapdss_dpi_display_disable(dssdev);
This page took 0.029147 seconds and 5 git commands to generate.