Message ID | 20200819043409.26010-3-nischal.varide@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/5] Critical-KclockWork-Fixes-intel_atomi.c-PossibleNull | expand |
diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c index 2da4388e1540..186a2d695bb6 100644 --- a/drivers/gpu/drm/i915/display/intel_sdvo.c +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c @@ -2505,6 +2505,9 @@ static int intel_sdvo_atomic_check(struct drm_connector *conn, struct intel_sdvo_connector_state *new_state = to_intel_sdvo_connector_state(new_conn_state); + if (!(new_conn_state && old_conn_state && old_state && new_state)) + return 0; + if (new_conn_state->crtc && (memcmp(&old_state->tv, &new_state->tv, sizeof(old_state->tv)) || memcmp(&old_conn_state->tv, &new_conn_state->tv, sizeof(old_conn_state->tv)))) {
This patch fixes Critical Klockwork errors and in this case a Possible Null Pointer Dereferencing is addressed with a Check before Dereferencing Signed-off-by: Nischal Varide <nischal.varide@intel.com> --- drivers/gpu/drm/i915/display/intel_sdvo.c | 3 +++ 1 file changed, 3 insertions(+)