ALSA: hda: dinput_mux check
authorMatthew Ranostay <mranostay@embeddedalley.com>
Sat, 20 Dec 2008 22:36:28 +0000 (17:36 -0500)
committerTakashi Iwai <tiwai@suse.de>
Sat, 20 Dec 2008 22:48:44 +0000 (23:48 +0100)
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>
sound/pci/hda/patch_sigmatel.c

index e2941cd8aeea616bdfa1c94b0e16ae887e6b7fd8..7ee4d4df893220fb1afddedd225751ae31f2ffae 100644 (file)
@@ -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;