diff options
author | Bubble Fang <bubblefang@google.com> | 2021-11-07 12:01:40 +0000 |
---|---|---|
committer | Bubble Fang <bubblefang@google.com> | 2021-11-07 12:14:51 +0000 |
commit | 43667cf179dda119cb8e6224fff04511c4c0045d (patch) | |
tree | f4208e3a70852cfe233380922f1d20b20efdfa39 | |
parent | 7c6cfed3e7ea8bb6371872aa8700d8d1f01456f4 (diff) | |
download | msm-extra-43667cf179dda119cb8e6224fff04511c4c0045d.tar.gz |
Asoc: check for invalid voice session id
Add check to return if session id is invalid.
From 28a5f166422bf0b8b91dc348d02e62212ee0b261 Mon Sep 17 00:00:00 2001
From: Lakshman Chaluvaraju <lchalu@codeaurora.org>
Date: Tue, 8 Jun 2021 10:43:20 +0530
Bug: 190503256
Signed-off-by: Bubble Fang <bubblefang@google.com>
Change-Id: I2833f375e7c971d2006de3d0c3d0a05ccf535111
-rw-r--r-- | asoc/msm-pcm-routing-v2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/asoc/msm-pcm-routing-v2.c b/asoc/msm-pcm-routing-v2.c index a704b570..d0ce8714 100644 --- a/asoc/msm-pcm-routing-v2.c +++ b/asoc/msm-pcm-routing-v2.c @@ -2376,6 +2376,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); |