[Intel-gfx] [PATCH] drm/i915: Resurrect warning from intel_encoder_crtc_ok()

Egbert Eich eich at suse.de
Wed Apr 16 11:46:06 CEST 2014


Bail out if crtc is NULL to keep the driver from crashing.

Signed-off-by: Egbert Eich <eich at suse.de>
---
 drivers/gpu/drm/i915/intel_display.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c276733..dfebced 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10257,6 +10257,11 @@ intel_modeset_stage_output_state(struct drm_device *dev,
 				new_crtc = set->crtc;
 		}
 
+		if (!new_crtc) {
+			WARN(1, "crtc not set!");
+			return -EINVAL;
+		}
+
 		/* Make sure the new CRTC will work with the encoder */
 		if (!drm_encoder_crtc_ok(&connector->new_encoder->base,
 					 new_crtc)) {
-- 
1.8.4.5




More information about the Intel-gfx mailing list