ASoC: dsp: Release lock before return

Before return with error, release the mutex.

Change-Id: I034a90f9c4f52df8bc8e30312f5241ac4ba7bba0
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
This commit is contained in:
Soumya Managoli 2023-11-07 11:24:19 +05:30
commit 82a064bd22

View file

@ -1506,8 +1506,10 @@ int q6core_map_mdf_memory_regions(uint64_t *buf_add, uint32_t mempool_id,
* bufcnt;
mmap_region_cmd = kzalloc(cmd_size, GFP_KERNEL);
if (mmap_region_cmd == NULL)
if (mmap_region_cmd == NULL) {
mutex_unlock(&q6core_lcl.cmd_lock);
return -ENOMEM;
}
mmap_regions = (struct avs_cmd_shared_mem_map_regions *)mmap_region_cmd;
mmap_regions->hdr.hdr_field = APR_HDR_FIELD(APR_MSG_TYPE_SEQ_CMD,