mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
dsp: lsm: check for mem_map_handle
Sometimes adsp may fail to allocate memory for SVA calibration data and add check if mem_map_handle is assigned with valid non-zero handle to avoid panic. Change-Id: Icad722edc52906e63d581aafa02b42b8518ebca6 Signed-off-by: Meng Wang <mengw@codeaurora.org>
This commit is contained in:
parent
47673f2f83
commit
fae3404de2
1 changed files with 2 additions and 0 deletions
|
|
@ -446,6 +446,8 @@ static int q6lsm_apr_send_pkt(struct lsm_client *client, void *handle,
|
|||
if (wait)
|
||||
mutex_unlock(&lsm_common.apr_lock);
|
||||
|
||||
if (mmap_p && *mmap_p == 0)
|
||||
ret = -ENOMEM;
|
||||
pr_debug("%s: leave ret %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue