summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
index a45d89f80106..3876cb2ec9db 100644
--- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
@@ -16215,7 +16215,8 @@ int msm_routing_set_downmix_control_data(int be_id, int session_id,
uint16_t ii;
uint16_t *dst_gain_ptr = NULL;
- if (be_id >= MSM_BACKEND_DAI_MAX) {
+ if (be_id < MSM_BACKEND_DAI_PRI_I2S_RX ||
+ be_id >= MSM_BACKEND_DAI_MAX) {
rc = -EINVAL;
return rc;
}