diff options
author | Saurav Kumar <quic_sauravk@quicinc.com> | 2021-10-21 15:06:42 +0530 |
---|---|---|
committer | Tapas Dey <quic_tapadey@quicinc.com> | 2023-08-23 18:25:52 +0530 |
commit | 552544deb1345d9318d7a4b0ec4f8911572944c0 (patch) | |
tree | 237880a93c671acd4dbf054b05ef54b2c5474f79 | |
parent | f50fa0ba225dc93df8e98690378ca1985c84930a (diff) |
Asoc: check for invalid voice session id
Add check to return if session id is invalid.
Change-Id: Ida0e07b78657102a3bf6e73a1ca23c44ad112426
Signed-off-by: Lakshman Chaluvaraju <lchalu@codeaurora.org>
Signed-off-by: Tapas Dey <quic_tapadey@quicinc.com>
-rw-r--r-- | sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c index b3b5ebd4d5a2..f918c3105306 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c @@ -2072,6 +2072,11 @@ static void msm_pcm_routing_process_voice(u16 reg, u16 val, int set) session_id = msm_pcm_routing_get_voc_sessionid(val); + if (!session_id) { + pr_err("%s: Invalid session_id %x\n", __func__, session_id); + return; + } + pr_debug("%s: FE DAI 0x%x session_id 0x%x\n", __func__, val, session_id); |