From: Seung-Woo Kim Date: Fri, 4 Nov 2011 08:31:41 +0000 (+0900) Subject: drm/exynos: checked for null pointer X-Git-Tag: upstream/snapshot3+hdmi~8651^2^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0e0f85631f9d905095d2896a952430f5eb0aba1;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git drm/exynos: checked for null pointer Signed-off-by: Seung-Woo Kim Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index f15da95..866f419 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c @@ -283,7 +283,8 @@ void exynos_drm_encoder_crtc_mode_set(struct drm_encoder *encoder, void *data) struct exynos_drm_overlay_ops *overlay_ops = manager->overlay_ops; struct exynos_drm_overlay *overlay = data; - overlay_ops->mode_set(manager->dev, overlay); + if (overlay_ops && overlay_ops->mode_set) + overlay_ops->mode_set(manager->dev, overlay); } void exynos_drm_encoder_crtc_disable(struct drm_encoder *encoder, void *data) @@ -294,7 +295,8 @@ void exynos_drm_encoder_crtc_disable(struct drm_encoder *encoder, void *data) DRM_DEBUG_KMS("\n"); - overlay_ops->disable(manager->dev); + if (overlay_ops && overlay_ops->disable) + overlay_ops->disable(manager->dev); /* * crtc is already detached from encoder and last