From: Bernard Zhao Date: Tue, 10 Nov 2020 08:03:13 +0000 (-0800) Subject: amd/display/amdgpu_dm: delete same check in if condition X-Git-Tag: baikal/mips/sdk5.9~12066^2^2~416 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=a96ef97d6b4359592515c2b884d018c09d86e8dd;p=kernel.git amd/display/amdgpu_dm: delete same check in if condition In function amdgpu_dm_connector_get_modes, drm_edid_is_valid will check weather (!edid), no need to check again in the if branch. Reviewed-by: Harry Wentland Signed-off-by: Bernard Zhao 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 16e7eb4028e2b..678bd81a9bff6 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6846,7 +6846,7 @@ static int amdgpu_dm_connector_get_modes(struct drm_connector *connector) encoder = amdgpu_dm_connector_to_encoder(connector); - if (!edid || !drm_edid_is_valid(edid)) { + if (!drm_edid_is_valid(edid)) { amdgpu_dm_connector->num_modes = drm_add_modes_noedid(connector, 640, 480); } else {