All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Ranostay <mranostay@embeddedalley.com>
To: alsa-devel@alsa-project.org
Cc: takashi Iwai <tiwai@suse.de>
Subject: [PATCH] hda: dinput_mux check
Date: Sat, 20 Dec 2008 17:36:28 -0500	[thread overview]
Message-ID: <494D736C.3000503@embeddedalley.com> (raw)

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>
---
diff --git a/pci/hda/patch_sigmatel.c b/pci/hda/patch_sigmatel.c
index 70181d5..fa87893 100644
--- a/pci/hda/patch_sigmatel.c
+++ b/pci/hda/patch_sigmatel.c
@@ -3601,7 +3601,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;

             reply	other threads:[~2008-12-20 22:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-20 22:36 Matthew Ranostay [this message]
2008-12-20 22:51 ` [PATCH] hda: dinput_mux check Takashi Iwai
2008-12-20 22:53   ` Matthew Ranostay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=494D736C.3000503@embeddedalley.com \
    --to=mranostay@embeddedalley.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.