]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] ALSA hda-codec - Fix NULL dereference in generic hda code
authorTakashi Iwai <tiwai@suse.de>
Thu, 18 Jan 2007 14:25:31 +0000 (15:25 +0100)
committerChris Wright <chrisw@sous-sol.org>
Mon, 5 Feb 2007 16:31:41 +0000 (08:31 -0800)
Fix NULL dereference in hda_generic.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
sound/pci/hda/hda_generic.c

index 97e9af130b7109fcee9ac0933d360d82a667ea0f..1589d2f2917f23aa3cc31652501e7281a15d5dde 100644 (file)
@@ -485,8 +485,9 @@ static const char *get_input_type(struct hda_gnode *node, unsigned int *pinctl)
                        return "Front Aux";
                return "Aux";
        case AC_JACK_MIC_IN:
-               if (node->pin_caps &
-                   (AC_PINCAP_VREF_80 << AC_PINCAP_VREF_SHIFT))
+               if (pinctl &&
+                   (node->pin_caps &
+                    (AC_PINCAP_VREF_80 << AC_PINCAP_VREF_SHIFT)))
                        *pinctl |= AC_PINCTL_VREF_80;
                if ((location & 0x0f) == AC_JACK_LOC_FRONT)
                        return "Front Mic";