diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-06-23 09:36:36 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-14 11:08:23 -0400 |
commit | 79e4424fbe83a4f2170f3cfa4628d5a34c520d37 (patch) | |
tree | 09f7c7787e3daf04063ecc10e15eb5812142a111 /drivers/video/omap2/displays/panel-picodlp.c | |
parent | 24305db864cd62bf4279f745528c3238cbaf1c12 (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/panel-picodlp.c')
-rw-r--r-- | drivers/video/omap2/displays/panel-picodlp.c | 6 |
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 b663e60e1a11..f0a51f49e48c 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) | |||
370 | * then only i2c commands can be successfully sent to dpp2600 | 370 | * then only i2c commands can be successfully sent to dpp2600 |
371 | */ | 371 | */ |
372 | msleep(1000); | 372 | msleep(1000); |
373 | if (omapdss_dpi_display_enable(dssdev)) { | 373 | r = omapdss_dpi_display_enable(dssdev); |
374 | if (r) { | ||
374 | dev_err(&dssdev->dev, "failed to enable DPI\n"); | 375 | dev_err(&dssdev->dev, "failed to enable DPI\n"); |
375 | goto err1; | 376 | goto err1; |
376 | } | 377 | } |
377 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
378 | 378 | ||
379 | r = picodlp_i2c_init(picod->picodlp_i2c_client); | 379 | r = picodlp_i2c_init(picod->picodlp_i2c_client); |
380 | if (r) | 380 | if (r) |
381 | goto err; | 381 | goto err; |
382 | 382 | ||
383 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | ||
384 | |||
383 | return r; | 385 | return r; |
384 | err: | 386 | err: |
385 | omapdss_dpi_display_disable(dssdev); | 387 | omapdss_dpi_display_disable(dssdev); |