From: Takashi Iwai Date: Wed, 8 Sep 2010 13:28:19 +0000 (+0200) Subject: ALSA: hda - Clear left-over hp_pins in snd_hda_parse_pin_def_config() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=03642c9a444079aa13f0864383a8f9ca04bfd198;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ALSA: hda - Clear left-over hp_pins in snd_hda_parse_pin_def_config() In snd_hda_parse_def_config(), some unused values may remain in hp_pins[] array during the headphone-reassignment workaround. This patch clears the unused array members. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 2980c277847a..bfdde7b0bafb 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -4558,6 +4558,8 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec, memmove(sequences_hp + i, sequences_hp + i + 1, sizeof(sequences_hp[0]) * (cfg->hp_outs - i)); } + memset(cfg->hp_pins + cfg->hp_outs, 0, + sizeof(hda_nid_t) * (AUTO_CFG_MAX_OUTS - cfg->hp_outs)); } /* sort by sequence */