summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/sdi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-06-23 15:38:21 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-14 17:08:23 +0200
commit05e1d6060743e34e3a9db65346168dc688f9223e (patch)
tree2c8ca4e0820392647fe03137be62b91f08def0ac /drivers/video/omap2/dss/sdi.c
parentOMAP: DSS2: PicoDLP: fix error handling in power_on (diff)
downloadlinux-05e1d6060743e34e3a9db65346168dc688f9223e.tar.xz
linux-05e1d6060743e34e3a9db65346168dc688f9223e.zip
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/sdi.c')
-rw-r--r--drivers/video/omap2/dss/sdi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 3a688c871a45..df2b3c3658a2 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -55,6 +55,11 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
unsigned long pck;
int r;
+ if (dssdev->manager == NULL) {
+ DSSERR("failed to enable display: no manager\n");
+ return -ENODEV;
+ }
+
r = omap_dss_start_device(dssdev);
if (r) {
DSSERR("failed to start device\n");