ASoc: msm: Fix array index out of bound issue

session_id is used as an array index in send_rtac_asm_apr() is not
checked for upper bound. Check for upper bound in order to avoid
array index out of bound issue.

Change-Id: I5016e03f86d2db4c0ebc097ae12b421266f8fce7
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
diff --git a/sound/soc/msm/qdsp6/q6asm.c b/sound/soc/msm/qdsp6/q6asm.c
index dc49f12..d822af5 100644
--- a/sound/soc/msm/qdsp6/q6asm.c
+++ b/sound/soc/msm/qdsp6/q6asm.c
@@ -3211,7 +3211,7 @@
 {
 	pr_debug("%s\n", __func__);
 
-	if (session_id < 0) {
+	if (session_id < 0 || session_id > SESSION_MAX) {
 		pr_err("%s: invalid session_id = %d\n", __func__, session_id);
 		return -EINVAL;
 	}