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 <aparmar@codeaurora.org>
This commit is contained in:
Ajay Singh Parmar 2015-11-11 23:04:12 -08:00 committed by David Keitel
parent 8355f8eb23
commit 71a3bc7811

View file

@ -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;
}
}