diff mbox series

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

Message ID 20200814024950.26830-2-nischal.varide@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/8] Critical KlockWork Error - Fixes - intel_cdclk.c - Possible NullPointerDereference1 | expand

Commit Message

Nischal Varide Aug. 14, 2020, 2:49 a.m. UTC
---
 drivers/gpu/drm/i915/display/intel_atomic.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

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 &&