From: Joonyoung Shim Date: Thu, 5 Feb 2015 07:11:38 +0000 (+0900) Subject: drm/exynos: fix NULL pointer reference X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=936ce5cce66ce6f9b5138a1ac0fbf0c2d459a960;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/exynos: fix NULL pointer reference There is a case called disable_plane callback function even if plane->crtc is NULL from exynos_drm_encoder_disable and it will cause NULL pointer reference error. Signed-off-by: Joonyoung Shim Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index 7e282e3d6038..57de0bdc5a3b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c @@ -102,7 +102,7 @@ static void exynos_drm_encoder_disable(struct drm_encoder *encoder) /* all planes connected to this encoder should be also disabled. */ drm_for_each_legacy_plane(plane, &dev->mode_config.plane_list) { - if (plane->crtc == encoder->crtc) + if (plane->crtc && (plane->crtc == encoder->crtc)) plane->funcs->disable_plane(plane); } }