Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fae3404d authored by Meng Wang's avatar Meng Wang
Browse files

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: default avatarMeng Wang <mengw@codeaurora.org>
parent 47673f2f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}