ASoC: msm: qdsp6v2: Move asm list init before apr registration

Move list init for no wait que before apr registration.
If apr registration fails asm free client will free
the no wait que.

Change-Id: I4707dbf4771a1ec313898adb2284c06ef1fb5b3a
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
This commit is contained in:
Ben Romberger 2015-12-11 20:24:57 -08:00 committed by David Keitel
parent 085abf8aee
commit be8713afec

View file

@ -1076,6 +1076,7 @@ struct audio_client *q6asm_audio_client_alloc(app_cb cb, void *priv)
ac->fptr_cache_ops = NULL;
/* DSP expects stream id from 1 */
ac->stream_id = 1;
INIT_LIST_HEAD(&ac->no_wait_que);
ac->apr = apr_register("ADSP", "ASM", \
(apr_fn)q6asm_callback,\
((ac->session) << 8 | 0x0001),\
@ -1122,7 +1123,6 @@ struct audio_client *q6asm_audio_client_alloc(app_cb cb, void *priv)
atomic_set(&ac->cmd_state, 0);
atomic_set(&ac->nowait_cmd_cnt, 0);
spin_lock_init(&ac->no_wait_que_spinlock);
INIT_LIST_HEAD(&ac->no_wait_que);
atomic_set(&ac->mem_state, 0);
rc = send_asm_custom_topology(ac);