summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLakshman Chaluvaraju <lchalu@codeaurora.org>2021-06-08 10:43:20 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2021-08-26 00:22:40 -0700
commit5b809d70594a1ce3ec5a15ad0401216e8d596fa1 (patch)
tree32ff6b73441faa955f2354d8d2f6239e0f97cdb6
parentaa52958f3ca1cd88f6dc6b7b84bb8918c38e7afa (diff)
downloadmsm-extra-5b809d70594a1ce3ec5a15ad0401216e8d596fa1.tar.gz
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>
-rw-r--r--asoc/msm-pcm-routing-v2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/asoc/msm-pcm-routing-v2.c b/asoc/msm-pcm-routing-v2.c
index 99e93c39..b52e5d70 100644
--- a/asoc/msm-pcm-routing-v2.c
+++ b/asoc/msm-pcm-routing-v2.c
@@ -2374,6 +2374,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);