]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/display: Remove duplicate null check
authorAlex Hung <alex.hung@amd.com>
Sat, 15 Jun 2024 01:06:59 +0000 (19:06 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2024 21:10:38 +0000 (17:10 -0400)
[WHAT & HOW]
The same display null check was a few lines above.

This fixes 1 DEADCODE issue reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c

index 7c9805705fd3804f15c4d297dbeceb6cf05656de..8c137d7c032e1ffa5d4e2ac288424ba4edba3008 100644 (file)
@@ -513,9 +513,6 @@ enum mod_hdcp_status mod_hdcp_hdcp2_create_session(struct mod_hdcp *hdcp)
        hdcp_cmd = (struct ta_hdcp_shared_memory *)psp->hdcp_context.context.mem_context.shared_buf;
        memset(hdcp_cmd, 0, sizeof(struct ta_hdcp_shared_memory));
 
-       if (!display)
-               return MOD_HDCP_STATUS_DISPLAY_NOT_FOUND;
-
        hdcp_cmd->in_msg.hdcp2_create_session_v2.display_handle = display->index;
 
        if (hdcp->connection.link.adjust.hdcp2.force_type == MOD_HDCP_FORCE_TYPE_0)