summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLakshman Chaluvaraju <quic_lchalu@quicinc.com>2022-01-20 17:28:46 +0530
committerLakshman Chaluvaraju <quic_lchalu@quicinc.com>2022-01-31 12:40:46 +0530
commitad59b31b3cd15d9e2e07eadbdeaf63008792c57e (patch)
treef7f8efb9b17f436c8b7bb9558ad48d5d7c008a3c
parent61eab15caa87ae09b5cf63846e6505aeaec7da21 (diff)
downloadmsm-extra-ad59b31b3cd15d9e2e07eadbdeaf63008792c57e.tar.gz
asoc: changes to fix KW errors
Add changes to fix KW errors. Change-Id: I87fc8bf5b2753cef6af881713637e9521389708d Signed-off-by: Lakshman Chaluvaraju <quic_lchalu@quicinc.com>
-rw-r--r--asoc/msm-pcm-routing-v2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/asoc/msm-pcm-routing-v2.c b/asoc/msm-pcm-routing-v2.c
index b52e5d70..868e254c 100644
--- a/asoc/msm-pcm-routing-v2.c
+++ b/asoc/msm-pcm-routing-v2.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/init.h>
@@ -1665,6 +1666,11 @@ static int msm_pcm_routing_channel_mixer_v2(int fe_id, bool perf_mode,
}
be_id = channel_mixer_v2[fe_id][sess_type].port_idx - 1;
+ if (be_id < 0 || be_id >= MSM_BACKEND_DAI_MAX) {
+ pr_err("%s: Received out of bounds be_id %d\n",
+ __func__, be_id);
+ return -EINVAL;
+ }
channel_mixer_v2[fe_id][sess_type].input_channels[0] =
channel_mixer_v2[fe_id][sess_type].input_channel;