DragonFlyBSD Kernel Audit
DF-1770 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/drm/i915/intel_dsi_vbt.c b/sys/dev/drm/i915/intel_dsi_vbt.c
--- a/sys/dev/drm/i915/intel_dsi_vbt.c
+++ b/sys/dev/drm/i915/intel_dsi_vbt.c
@@ -136,6 +136,10 @@
 	else
 		port = intel_dsi_seq_port_to_port(seq_port);
 
+	if (!intel_dsi->dsi_hosts[port]) {
+		DRM_DEBUG_KMS("no DSI host for port %c\n", port_name(port));
+		goto out;
+	}
 	dsi_device = intel_dsi->dsi_hosts[port]->device;
 	if (!dsi_device) {
 		DRM_DEBUG_KMS("no dsi device for port %c\n", port_name(port));