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>
This commit is contained in:
parent
24305db864
commit
79e4424fbe
1 changed files with 4 additions and 2 deletions
|
@ -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
|
* then only i2c commands can be successfully sent to dpp2600
|
||||||
*/
|
*/
|
||||||
msleep(1000);
|
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");
|
dev_err(&dssdev->dev, "failed to enable DPI\n");
|
||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
|
|
||||||
|
|
||||||
r = picodlp_i2c_init(picod->picodlp_i2c_client);
|
r = picodlp_i2c_init(picod->picodlp_i2c_client);
|
||||||
if (r)
|
if (r)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
err:
|
err:
|
||||||
omapdss_dpi_display_disable(dssdev);
|
omapdss_dpi_display_disable(dssdev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue