[Intel-gfx] [PATCH 2/8] Critical KlockWork Error - Fixes - intel_atomic.c - Possible NullPointerDereference1

Nischal Varide nischal.varide at intel.com
Fri Aug 14 02:49:44 UTC 2020


---
 drivers/gpu/drm/i915/display/intel_atomic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
index 630f49b7aa01..49ca65b207df 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic.c
@@ -192,6 +192,8 @@ intel_connector_needs_modeset(struct intel_atomic_state *state,
 
 	old_conn_state = drm_atomic_get_old_connector_state(&state->base, connector);
 	new_conn_state = drm_atomic_get_new_connector_state(&state->base, connector);
+	if (!(old_conn_state && new_conn_state))
+		return 0;
 
 	return old_conn_state->crtc != new_conn_state->crtc ||
 	       (new_conn_state->crtc &&
-- 
2.26.0



More information about the Intel-gfx mailing list