Skip to content

Commit

Permalink
OMAP: DSS2: PicoDLP: fix error handling in power_on
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen committed Sep 14, 2011
1 parent 24305db commit 79e4424
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/video/omap2/displays/panel-picodlp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 79e4424

Please sign in to comment.