Merge "ASoC: APR: Fix missing APR deregister from asm"
This commit is contained in:
commit
33a94f46e5
2 changed files with 8 additions and 9 deletions
|
@ -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];
|
||||
|
|
|
@ -1038,14 +1038,12 @@ void q6asm_audio_client_free(struct audio_client *ac)
|
|||
}
|
||||
|
||||
rtac_set_asm_handle(ac->session, NULL);
|
||||
if (!atomic_read(&ac->reset)) {
|
||||
apr_deregister(ac->apr2);
|
||||
apr_deregister(ac->apr);
|
||||
q6asm_mmap_apr_dereg();
|
||||
ac->apr2 = NULL;
|
||||
ac->apr = NULL;
|
||||
ac->mmap_apr = NULL;
|
||||
}
|
||||
apr_deregister(ac->apr2);
|
||||
apr_deregister(ac->apr);
|
||||
q6asm_mmap_apr_dereg();
|
||||
ac->apr2 = NULL;
|
||||
ac->apr = NULL;
|
||||
ac->mmap_apr = NULL;
|
||||
q6asm_session_free(ac);
|
||||
|
||||
pr_debug("%s: APR De-Register\n", __func__);
|
||||
|
|
Loading…
Add table
Reference in a new issue