Commit 5d93060d authored by Alex Hung's avatar Alex Hung Committed by Alex Deucher

drm/amd/display: Check HDCP returned status

[WHAT & HOW]
Check mod_hdcp_execute_and_set() return values in authenticated_dp.

This fixes 3 CHECKED_RETURN issues reported by Coverity.
Reviewed-by: default avatarRodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2c2ee1d1
...@@ -433,17 +433,20 @@ static enum mod_hdcp_status authenticated_dp(struct mod_hdcp *hdcp, ...@@ -433,17 +433,20 @@ static enum mod_hdcp_status authenticated_dp(struct mod_hdcp *hdcp,
} }
if (status == MOD_HDCP_STATUS_SUCCESS) if (status == MOD_HDCP_STATUS_SUCCESS)
mod_hdcp_execute_and_set(mod_hdcp_read_bstatus, if (!mod_hdcp_execute_and_set(mod_hdcp_read_bstatus,
&input->bstatus_read, &status, &input->bstatus_read, &status,
hdcp, "bstatus_read"); hdcp, "bstatus_read"))
goto out;
if (status == MOD_HDCP_STATUS_SUCCESS) if (status == MOD_HDCP_STATUS_SUCCESS)
mod_hdcp_execute_and_set(check_link_integrity_dp, if (!mod_hdcp_execute_and_set(check_link_integrity_dp,
&input->link_integrity_check, &status, &input->link_integrity_check, &status,
hdcp, "link_integrity_check"); hdcp, "link_integrity_check"))
goto out;
if (status == MOD_HDCP_STATUS_SUCCESS) if (status == MOD_HDCP_STATUS_SUCCESS)
mod_hdcp_execute_and_set(check_no_reauthentication_request_dp, if (!mod_hdcp_execute_and_set(check_no_reauthentication_request_dp,
&input->reauth_request_check, &status, &input->reauth_request_check, &status,
hdcp, "reauth_request_check"); hdcp, "reauth_request_check"))
goto out;
out: out:
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment