summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-05-26 06:31:12 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-26 06:31:12 -0700
commit33a94f46e5ab4eb83334bdf69bfc17155b49da7e (patch)
tree2e67c09c653377dea58b469f0fbc9d8c30a63df7 /drivers/soc
parent38814e7f3190f86d89d61e4165b8b385509417a7 (diff)
parent8f0c7ae73c205b9a1cfc685cbee9cb4ba437a554 (diff)
Merge "ASoC: APR: Fix missing APR deregister from asm"
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/qdsp6v2/apr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/soc/qcom/qdsp6v2/apr.c b/drivers/soc/qcom/qdsp6v2/apr.c
index a275537d4e08..2da8731c5753 100644
--- a/drivers/soc/qcom/qdsp6v2/apr.c
+++ b/drivers/soc/qcom/qdsp6v2/apr.c
@@ -745,13 +745,14 @@ int apr_deregister(void *handle)
if (!handle)
return -EINVAL;
+ mutex_lock(&svc->m_lock);
if (!svc->svc_cnt) {
pr_err("%s: svc already deregistered. svc = %pK\n",
__func__, svc);
+ mutex_unlock(&svc->m_lock);
return -EINVAL;
}
- mutex_lock(&svc->m_lock);
dest_id = svc->dest_id;
client_id = svc->client_id;
clnt = &client[dest_id][client_id];