asoc: lpass-cdc: fix for array out of bounds for active ch mask and ch_cnt

update check not to exceed the array index for active_ch_mask and active_ch_cnt

Change-Id: Ic6d72d7469edbd004cd34a709384d527e90cd26f
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
This commit is contained in:
Prasad Kumpatla
2022-04-29 11:55:37 +05:30
parent 42e49611b0
commit c9930cc8d8
2 changed files with 2 additions and 2 deletions

View File

@@ -2172,7 +2172,7 @@ static int lpass_cdc_wsa2_macro_rx_mux_put(struct snd_kcontrol *kcontrol,
dev_err_ratelimited(wsa2_dev, "%s: AIF reset already\n", __func__);
return 0;
}
if (aif_rst >= LPASS_CDC_WSA2_MACRO_RX_MAX) {
if (aif_rst >= LPASS_CDC_WSA2_MACRO_MAX_DAIS) {
dev_err_ratelimited(wsa2_dev, "%s: Invalid AIF reset\n", __func__);
return 0;
}