Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196769
b: refs/heads/master
c: fce064c
h: refs/heads/master
i:
  196767: e4590bf
v: v3
  • Loading branch information
Jani Nikula authored and Tomi Valkeinen committed May 18, 2010
1 parent 6a6f0dd commit cc7f7a6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 368a148ea3833b540945fa53a63227c8ce76aa8f
refs/heads/master: fce064cbda85dda330150e8d4d9f6db1a3300023
54 changes: 41 additions & 13 deletions trunk/drivers/video/omap2/dss/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ static int omap_dss_probe(struct platform_device *pdev)

r = dss_get_clocks();
if (r)
goto fail0;
goto err_clocks;

dss_clk_enable_all_no_ctx();

Expand All @@ -523,57 +523,64 @@ static int omap_dss_probe(struct platform_device *pdev)
r = dss_init(skip_init);
if (r) {
DSSERR("Failed to initialize DSS\n");
goto fail0;
goto err_dss;
}

r = rfbi_init();
if (r) {
DSSERR("Failed to initialize rfbi\n");
goto fail0;
goto err_rfbi;
}

r = dpi_init(pdev);
if (r) {
DSSERR("Failed to initialize dpi\n");
goto fail0;
goto err_dpi;
}

r = dispc_init();
if (r) {
DSSERR("Failed to initialize dispc\n");
goto fail0;
goto err_dispc;
}

r = venc_init(pdev);
if (r) {
DSSERR("Failed to initialize venc\n");
goto fail0;
goto err_venc;
}

if (cpu_is_omap34xx()) {
r = sdi_init(skip_init);
if (r) {
DSSERR("Failed to initialize SDI\n");
goto fail0;
goto err_sdi;
}

r = dsi_init(pdev);
if (r) {
DSSERR("Failed to initialize DSI\n");
goto fail0;
goto err_dsi;
}
}

r = dss_initialize_debugfs();
if (r)
goto fail0;
goto err_debugfs;

for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];

r = omap_dss_register_device(dssdev);
if (r)
DSSERR("device reg failed %d\n", i);
if (r) {
DSSERR("device %d %s register failed %d\n", i,
dssdev->name ?: "unnamed", r);

while (--i >= 0)
omap_dss_unregister_device(pdata->devices[i]);

goto err_register;
}

if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0)
pdata->default_device = dssdev;
Expand All @@ -583,8 +590,29 @@ static int omap_dss_probe(struct platform_device *pdev)

return 0;

/* XXX fail correctly */
fail0:
err_register:
dss_uninitialize_debugfs();
err_debugfs:
if (cpu_is_omap34xx())
dsi_exit();
err_dsi:
if (cpu_is_omap34xx())
sdi_exit();
err_sdi:
venc_exit();
err_venc:
dispc_exit();
err_dispc:
dpi_exit();
err_dpi:
rfbi_exit();
err_rfbi:
dss_exit();
err_dss:
dss_clk_disable_all_no_ctx();
dss_put_clocks();
err_clocks:

return r;
}

Expand Down

0 comments on commit cc7f7a6

Please sign in to comment.