Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00f17e45 authored by Rob Clark's avatar Rob Clark Committed by Tomi Valkeinen
Browse files

OMAPDSS: fix potential NULL pointer ref in OCP_ERR handling path



The dispc's error handler tries to disable all outputs when OCP_ERR
happens. However, the code doesn't check if there actually is a display
on each particular output, nor if there's a driver for the display. This
may lead to NULL pointer reference.

Signed-off-by: default avatarRob Clark <rob@ti.com>
[tomi.valkeinen@ti.com: added patch description]
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent f806f9b6
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3201,6 +3201,7 @@ static void dispc_error_worker(struct work_struct *work)
		for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
		for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
			struct omap_overlay_manager *mgr;
			struct omap_overlay_manager *mgr;
			mgr = omap_dss_get_overlay_manager(i);
			mgr = omap_dss_get_overlay_manager(i);
			if (mgr->device && mgr->device->driver)
				mgr->device->driver->disable(mgr->device);
				mgr->device->driver->disable(mgr->device);
		}
		}
	}
	}