summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-06-23 16:36:36 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-14 18:08:23 +0300
commit79e4424fbe83a4f2170f3cfa4628d5a34c520d37 (patch)
tree09f7c7787e3daf04063ecc10e15eb5812142a111 /drivers/video/omap2/displays
parent24305db864cd62bf4279f745528c3238cbaf1c12 (diff)
OMAP: DSS2: PicoDLP: fix error handling in power_on
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>
Diffstat (limited to 'drivers/video/omap2/displays')
-rw-r--r--drivers/video/omap2/displays/panel-picodlp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/omap2/displays/panel-picodlp.c b/drivers/video/omap2/displays/panel-picodlp.c
index b663e60e1a1..f0a51f49e48 100644
--- a/drivers/video/omap2/displays/panel-picodlp.c
+++ b/drivers/video/omap2/displays/panel-picodlp.c
@@ -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);