diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-06-23 16:38:21 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-14 18:08:23 +0300 |
commit | 05e1d6060743e34e3a9db65346168dc688f9223e (patch) | |
tree | 2c8ca4e0820392647fe03137be62b91f08def0ac /drivers/video/omap2/dss/dsi.c | |
parent | 79e4424fbe83a4f2170f3cfa4628d5a34c520d37 (diff) | |
download | op-kernel-dev-05e1d6060743e34e3a9db65346168dc688f9223e.zip op-kernel-dev-05e1d6060743e34e3a9db65346168dc688f9223e.tar.gz |
OMAP: DSS2: check for manager when enabling display
None of the DSS interface drivers check if an overlay manager is
connected to the display when the display is being enabled. This leads
to null pointer crash if the display has no manager.
This patch checks for the manager and returns an error if it is null.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dsi.c')
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 7adbbeb..12da2fb 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -4211,6 +4211,12 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev) mutex_lock(&dsi->lock); + if (dssdev->manager == NULL) { + DSSERR("failed to enable display: no manager\n"); + r = -ENODEV; + goto err_start_dev; + } + r = omap_dss_start_device(dssdev); if (r) { DSSERR("failed to start device\n"); |