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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Egbert Eich <eich@xxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux