summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaurav Kumar <quic_sauravk@quicinc.com>2021-10-21 15:06:42 +0530
committerGeorg Veichtlbauer <georg@vware.at>2023-11-08 17:53:52 +0100
commitd6df26ee1bbb50a4362daa182185f3f85c604d7e (patch)
tree315910d569a804a7c38455c21de90149c106f64c
parenta564e9b7f384bf1b3f0036bb105e93feae0a0020 (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.c5
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 8e65e2ae3684..d84afdb4a6a6 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);