Ver Fonte

asoc: initialize rx_ch and tx_ch array before use

Initialize rx_ch and tx_ch array before use.

Change-Id: Id31c65101be2630a55b5b96bd3e35199758e243e
Signed-off-by: Meng Wang <[email protected]>
Meng Wang há 3 anos atrás
pai
commit
f70e2d8de4
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      asoc/msm_common.c

+ 1 - 1
asoc/msm_common.c

@@ -378,7 +378,7 @@ int msm_channel_map_get(struct snd_kcontrol *kcontrol,
 			(struct chmap_pdata *)kcontrol->private_data;
 	struct snd_soc_dai *codec_dai = NULL;
 	int backend_id = 0;
-	uint32_t rx_ch[MAX_PORT], tx_ch[MAX_PORT];
+	uint32_t rx_ch[MAX_PORT] = {0}, tx_ch[MAX_PORT] = {0};
 	uint32_t rx_ch_cnt = 0, tx_ch_cnt = 0;
 	uint32_t *chmap_data = NULL;
 	int ret = 0, len = 0, i = 0;