diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2964-drm-amd-display-remove-redundant-null-check-of-array.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2964-drm-amd-display-remove-redundant-null-check-of-array.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2964-drm-amd-display-remove-redundant-null-check-of-array.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2964-drm-amd-display-remove-redundant-null-check-of-array.patch new file mode 100644 index 00000000..ef209fc4 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2964-drm-amd-display-remove-redundant-null-check-of-array.patch @@ -0,0 +1,39 @@ +From 2f9f78a3177c40722bde8ca330bc5110998607fd Mon Sep 17 00:00:00 2001 +From: Colin Ian King <colin.king@canonical.com> +Date: Fri, 15 Dec 2017 10:53:43 +0000 +Subject: [PATCH 2964/4131] drm/amd/display: remove redundant null check of + array 'data' +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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 <christian.koenig@amd.com> +Reviewed-by: Harry Wentland <harry.wentland@amd.com> +Signed-off-by: Colin Ian King <colin.king@canonical.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +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 05703dc..d66af76 100644 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -3031,8 +3031,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); + +-- +2.7.4 + |