Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 936ce5cc authored by Joonyoung Shim's avatar Joonyoung Shim Committed by Inki Dae
Browse files

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: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent d9ea6256
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}
}