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 <mengw@codeaurora.org>
This commit is contained in:
Meng Wang
2021-05-11 12:34:18 +08:00
parent 7cc7e513af
commit f70e2d8de4

View File

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