diff --git a/msm/sde_hdcp_2x.c b/msm/sde_hdcp_2x.c index f578e09cd2..bc2b357e82 100644 --- a/msm/sde_hdcp_2x.c +++ b/msm/sde_hdcp_2x.c @@ -589,7 +589,10 @@ static void sde_hdcp_2x_msg_recvd(struct sde_hdcp_2x_ctrl *hdcp) goto exit; } - out_msg = (u32)hdcp->app_data.response.data[0]; + if (hdcp->app_data.response.length == 0) + out_msg = INVALID_MESSAGE; + else + out_msg = (u32)hdcp->app_data.response.data[0]; pr_debug("[tz]: %s\n", sde_hdcp_2x_message_name(out_msg));