From: Colin Ian King Date: Fri, 15 Dec 2017 10:53:43 +0000 (+0000) Subject: drm/amd/display: remove redundant null check of array 'data' X-Git-Tag: v4.19~1610^2~23^2~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a89ff457d6f6200cd58db568c0138988bb60579c;p=platform%2Fkernel%2Flinux-rpi3.git drm/amd/display: remove redundant null check of array 'data' The null check on aconnector->base.edid_blob_ptr->data is redundant since data is an array and can never be null. Remove it. Detected by CoverityScan, CID#1460369 ("Array compared against 0") Acked-by: Christian König Reviewed-by: Harry Wentland Signed-off-by: Colin Ian King 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 8e76219..1cf51bc 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2725,8 +2725,7 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector) }; struct edid *edid; - if (!aconnector->base.edid_blob_ptr || - !aconnector->base.edid_blob_ptr->data) { + if (!aconnector->base.edid_blob_ptr) { DRM_ERROR("No EDID firmware found on connector: %s ,forcing to OFF!\n", aconnector->base.name);