Message ID | 20200824034556.26626-3-nischal.varide@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/5] Fixing Possible Null Pointer Dereference | 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 addresses a Possible Null Pointer Dereference of variables new_stae, new_conn_state and old_state, old_conn_state in intel_sdvo.c Signed-off-by: Nischal Varide <nischal.varide@intel.com> --- drivers/gpu/drm/i915/display/intel_sdvo.c | 3 +++ 1 file changed, 3 insertions(+)