disp: msm: dp: fix potential NULL pointer dereference

Fix the potential NULL pointer dereference in the callback function
for HDCP status updates.

Change-Id: I57ffc480cc6a8f89db0d18151a07876aeeb8c236
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
Tatenda Chipeperekwa
2020-07-08 12:01:46 -07:00
parent b86633e592
commit 91fbf98537

View File

@@ -581,14 +581,15 @@ static void dp_display_notify_hdcp_status_cb(void *ptr,
enum sde_hdcp_state state)
{
struct dp_display_private *dp = ptr;
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY,
dp->link->hdcp_status.hdcp_state);
if (!dp) {
DP_ERR("invalid input\n");
return;
}
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY,
dp->link->hdcp_status.hdcp_state);
dp->link->hdcp_status.hdcp_state = state;
queue_delayed_work(dp->wq, &dp->hdcp_cb_work, HZ/4);