drm/amd/display: remove redundant null check of array 'data'
authorColin Ian King <colin.king@canonical.com>
Fri, 15 Dec 2017 10:53:43 +0000 (10:53 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Dec 2017 22:15:09 +0000 (17:15 -0500)
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

index 8e7621931b92587f6a7e629e413abe465cb64c98..1cf51bcbbb4a3a0351f3b93ee6fe8c2f67e7f9f1 100644 (file)
@@ -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);