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

Commit f8ccbf65 authored by Matt Ranostay's avatar Matt Ranostay Committed by Takashi Iwai
Browse files

ALSA: hda: dinput_mux check



Add check to determine if dinput_mux is set by any of patch_stac*() functions,
otherwise a invalid pointer my be referenced causing gibberish to mixer values.

Signed-off-by: default avatarMatthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8326e32c
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3589,6 +3589,7 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
		spec->mixers[spec->num_mixers++] = spec->kctls.list;
		spec->mixers[spec->num_mixers++] = spec->kctls.list;


	spec->input_mux = &spec->private_imux;
	spec->input_mux = &spec->private_imux;
	if (!spec->dinput_mux)
		spec->dinput_mux = &spec->private_dimux;
		spec->dinput_mux = &spec->private_dimux;
	spec->sinput_mux = &spec->private_smux;
	spec->sinput_mux = &spec->private_smux;
	spec->mono_mux = &spec->private_mono_mux;
	spec->mono_mux = &spec->private_mono_mux;