drm/exynos: Fix potential NULL pointer dereference in exynos_drm_encoder.c
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 19 Nov 2012 09:20:30 +0000 (14:50 +0530)
committerInki Dae <inki.dae@samsung.com>
Thu, 22 Nov 2012 08:55:17 +0000 (17:55 +0900)
Check overlay_ops is not NULL as checked in the previous 'if' condition.
Fixes the following smatch error:
drivers/gpu/drm/exynos/exynos_drm_encoder.c:509 exynos_drm_encoder_plane_disable()
error: we previously assumed 'overlay_ops' could be null (see line 499)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_encoder.c

index 607231a71b2d565766e7f5f001e12e02737622d4..f2df06c603f72a522527226aa9622cfd7e4c09fa 100644 (file)
@@ -513,6 +513,6 @@ void exynos_drm_encoder_plane_disable(struct drm_encoder *encoder, void *data)
         * because the setting for disabling the overlay will be updated
         * at vsync.
         */
-       if (overlay_ops->wait_for_vblank)
+       if (overlay_ops && overlay_ops->wait_for_vblank)
                overlay_ops->wait_for_vblank(manager->dev);
 }