diff options
author | Rob Clark <rob@ti.com> | 2011-12-11 15:02:27 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-01-02 01:51:26 -0500 |
commit | 00f17e4560da32db454c46faf1e8df4fe35cc226 (patch) | |
tree | be15778a94345ac75130f048abf000163355577b /drivers/video/omap2/dss | |
parent | f806f9b6b8ec2c8b6a3297e684bcb80f54e3dc98 (diff) |
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: Rob Clark <rob@ti.com>
[tomi.valkeinen@ti.com: added patch description]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 0f84034928ad..4d684282b201 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -3201,7 +3201,8 @@ static void dispc_error_worker(struct work_struct *work) | |||
3201 | for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) { | 3201 | for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) { |
3202 | struct omap_overlay_manager *mgr; | 3202 | struct omap_overlay_manager *mgr; |
3203 | mgr = omap_dss_get_overlay_manager(i); | 3203 | mgr = omap_dss_get_overlay_manager(i); |
3204 | mgr->device->driver->disable(mgr->device); | 3204 | if (mgr->device && mgr->device->driver) |
3205 | mgr->device->driver->disable(mgr->device); | ||
3205 | } | 3206 | } |
3206 | } | 3207 | } |
3207 | 3208 | ||