drm/amd/display: Remove unnecessary NULL check
authorEryk Brol <eryk.brol@amd.com>
Tue, 8 Dec 2020 17:52:36 +0000 (12:52 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Dec 2020 20:02:12 +0000 (15:02 -0500)
[Why]
new_crtc_state is already dereferenced earlier in the function

[How]
Remove the check

Signed-off-by: Eryk Brol <eryk.brol@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 2c4dbde..8fac611 100644 (file)
@@ -9367,7 +9367,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
                if (ret)
                        goto fail;
 
-               if (dm_old_crtc_state->dsc_force_changed && new_crtc_state)
+               if (dm_old_crtc_state->dsc_force_changed)
                        new_crtc_state->mode_changed = true;
        }