From 71a3bc78112e84b67b02014e70ec5fa71c81a572 Mon Sep 17 00:00:00 2001 From: Ajay Singh Parmar Date: Wed, 11 Nov 2015 23:04:12 -0800 Subject: msm: hdcp: do not return error if work is already queued Apart from authentications start, if any other work is already queued, do not return any error in that case as the work is going to run eventually. This doesn't apply for authentication start as last session should have been closed before new one is started. Change-Id: If5f61f05758135d303974f8bd824ffcc9387259d Signed-off-by: Ajay Singh Parmar --- drivers/misc/hdcp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/misc') diff --git a/drivers/misc/hdcp.c b/drivers/misc/hdcp.c index 0df388a841d6..18265fd80726 100644 --- a/drivers/misc/hdcp.c +++ b/drivers/misc/hdcp.c @@ -806,9 +806,11 @@ static int hdcp_lib_check_valid_state(struct hdcp_lib_handle *handle) { int rc = 0; + if (!list_empty(&handle->worker.work_list)) + hdcp_lib_check_worker_status(handle); + if (handle->wakeup_cmd == HDCP_LIB_WKUP_CMD_START) { if (!list_empty(&handle->worker.work_list)) { - hdcp_lib_check_worker_status(handle); rc = -EBUSY; goto exit; } @@ -819,8 +821,7 @@ static int hdcp_lib_check_valid_state(struct hdcp_lib_handle *handle) } if (!(handle->hdcp_state & HDCP_STATE_APP_LOADED)) { - pr_err("hdcp 2.2 app not loaded\n"); - rc = -EINVAL; + pr_warn("hdcp 2.2 app not loaded\n"); goto exit; } } -- cgit v1.2.3