Pārlūkot izejas kodu

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 <[email protected]>
Prasad Kumpatla 2 gadi atpakaļ
vecāks
revīzija
c9930cc8d8

+ 1 - 1
asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c

@@ -2398,7 +2398,7 @@ static int lpass_cdc_wsa_macro_rx_mux_put(struct snd_kcontrol *kcontrol,
 			dev_err_ratelimited(wsa_dev, "%s: AIF reset already\n", __func__);
 			return 0;
 		}
-		if (aif_rst >= LPASS_CDC_WSA_MACRO_RX_MAX) {
+		if (aif_rst >= LPASS_CDC_WSA_MACRO_MAX_DAIS) {
 			dev_err_ratelimited(wsa_dev, "%s: Invalid AIF reset\n", __func__);
 			return 0;
 		}

+ 1 - 1
asoc/codecs/lpass-cdc/lpass-cdc-wsa2-macro.c

@@ -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;
 		}