From 1f3f53ae5179ba7f24b4a429bc41773f1f4857ca Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 17 Dec 2011 13:28:52 -0600 Subject: [PATCH] OMAPDSS: APPLY: fix NULL pointer deref when mgr is not set 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 Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/apply.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 0a6fb8de19c0..052dc874cd3d 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -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) -- 2.30.2