Skip to content

Commit

Permalink
ALSA: hda: dinput_mux check
Browse files Browse the repository at this point in the history
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: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Matthew Ranostay authored and Takashi Iwai committed Dec 20, 2008
1 parent 8326e32 commit f8ccbf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -3589,7 +3589,8 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
spec->mixers[spec->num_mixers++] = spec->kctls.list;

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

0 comments on commit f8ccbf6

Please sign in to comment.