Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03642c9a authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent eb7f80c1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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 */