From ce86cc5397d303e6121383f9b152202e2cfb7532 Mon Sep 17 00:00:00 2001 From: Sandeep Gangadharaiah Date: Fri, 22 Oct 2021 18:58:13 -0400 Subject: [PATCH] disp: msm: dp: fix warnings due to dp_hdcp2p2 thread reparking This change checks "dp_hdcp2p2" thread's parked state, before attempting to park the thread. This would avoid a warning message from the kernel module, in case if the thread is already parked. Change-Id: I3133da7159c9806981e4760be275c0a54036958b Signed-off-by: Sandeep Gangadharaiah --- msm/dp/dp_hdcp2p2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/msm/dp/dp_hdcp2p2.c b/msm/dp/dp_hdcp2p2.c index d346ae891f..bd94ca3989 100644 --- a/msm/dp/dp_hdcp2p2.c +++ b/msm/dp/dp_hdcp2p2.c @@ -316,7 +316,8 @@ static int dp_hdcp2p2_authenticate(void *input) ctrl->sink_status = SINK_CONNECTED; atomic_set(&ctrl->auth_state, HDCP_STATE_AUTHENTICATING); - kthread_park(ctrl->thread); + if (kthread_should_park()) + kthread_park(ctrl->thread); kfifo_reset(&ctrl->cmd_q); kthread_unpark(ctrl->thread);