All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/exynos: Fix potential NULL pointer dereference in exynos_drm_encoder.c
@ 2012-11-19  9:20 Sachin Kamat
  2012-11-19  9:44 ` Inki Dae
  0 siblings, 1 reply; 9+ messages in thread
From: Sachin Kamat @ 2012-11-19  9:20 UTC (permalink / raw)
  To: dri-devel; +Cc: sachin.kamat, patches

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>
---
 drivers/gpu/drm/exynos/exynos_drm_encoder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index e51503f..a44238e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -506,6 +506,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);
 }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-11-22  8:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19  9:20 [PATCH 1/1] drm/exynos: Fix potential NULL pointer dereference in exynos_drm_encoder.c Sachin Kamat
2012-11-19  9:44 ` Inki Dae
2012-11-19  9:55   ` Sachin Kamat
2012-11-19 10:00     ` Inki Dae
2012-11-19 10:02       ` Sachin Kamat
2012-11-22  6:13         ` Sachin Kamat
2012-11-22  8:11           ` Inki Dae
2012-11-22  8:18             ` Sachin Kamat
2012-11-22  8:26               ` Inki Dae

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.