asoc: Fixed OOB issue in qcs405

Fixed OOB issue is in function msm_meta_mi2s_snd_shutdown

Change-Id: I8be7d019eb9b89baaef71fa53dd6c7f2383181c0
Signed-off-by: Thrithendra Ungarala <quic_tungaral@quicinc.com>
Signed-off-by: basappa <quic_basappa@quicinc.com>
This commit is contained in:
Thrithendra Ungarala 2024-07-23 14:49:45 +05:30 • committed by Shaik Jabida
commit c90d923bdd

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022,2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/clk.h>
#include <linux/delay.h>
@ -7376,7 +7376,7 @@ static void msm_meta_mi2s_snd_shutdown(struct snd_pcm_substream *substream)
pr_debug("%s(): substream = %s stream = %d\n", __func__,
substream->name, substream->stream);
if (index < PRIM_MI2S || index >= MI2S_MAX) {
if (index < PRIM_MI2S || index >= META_MI2S_MAX) {
pr_err("%s:invalid MI2S DAI(%d)\n", __func__, index);
return;
}