OMAPDSS: APPLY: fix NULL pointer deref when mgr is not set
authorRob Clark <rob@ti.com>
Sat, 17 Dec 2011 19:28:52 +0000 (13:28 -0600)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 2 Jan 2012 06:51:28 +0000 (08:51 +0200)
extra_info_update_ongoing() goes through all overlays, but doesn't check
if the overlay is connected to a manager. This leads to a crash whenever
an overlay has been detached.

Add a check to skip the non-connected overlays.

Reported-by: Rob Clark <rob@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/apply.c

index 0a6fb8d..052dc87 100644 (file)
@@ -327,6 +327,9 @@ static bool extra_info_update_ongoing(void)
                ovl = omap_dss_get_overlay(i);
                op = get_ovl_priv(ovl);
 
+               if (!ovl->manager)
+                       continue;
+
                mp = get_mgr_priv(ovl->manager);
 
                if (!mp->enabled)