Asoc: check for invalid voice session id

Add check to return if session id is invalid.

Change-Id: Id156612a341a370529945aa7ac9ea01fb8796f4f
Signed-off-by: Jing Wang <quic_jingwa@quicinc.com>
This commit is contained in:
Jing Wang 2022-05-18 15:43:30 +05:30 • committed by Gerrit - the friendly Code Review server
commit c781ff0891

View file

@ -3052,6 +3052,11 @@ static void msm_pcm_routing_process_voice(u16 reg, u16 val, int set)
pr_debug("%s: FE DAI 0x%x session_id 0x%x\n",
__func__, val, session_id);
if (!session_id) {
pr_err("%s: Invalid session_id %x\n", __func__, session_id);
return;
}
mutex_lock(&routing_lock);
if (set)