From: Eryk Brol Date: Tue, 8 Dec 2020 17:52:36 +0000 (-0500) Subject: drm/amd/display: Remove unnecessary NULL check X-Git-Tag: baikal/mips/sdk5.9~11886^2^2~10 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=1067b248fe18d5923988a89f4796c783caf0b1e3;p=kernel.git drm/amd/display: Remove unnecessary NULL check [Why] new_crtc_state is already dereferenced earlier in the function [How] Remove the check Signed-off-by: Eryk Brol Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 2c4dbdeec46a6..8fac6116591bf 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -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; }