diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-01-18 15:25:31 +0100 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2007-02-05 08:31:41 -0800 |
commit | c8e340f99f59bf76a3e02630bcd1aa9791faa8b5 (patch) | |
tree | 8c5cf943abeb8bf6e969abade12bfbfd3d560929 | |
parent | 7fbbb01dca7704d52ace6f45a805c98a5b0362f9 (diff) | |
download | kernel-adaptation-pc-c8e340f99f59bf76a3e02630bcd1aa9791faa8b5.tar.gz kernel-adaptation-pc-c8e340f99f59bf76a3e02630bcd1aa9791faa8b5.tar.bz2 kernel-adaptation-pc-c8e340f99f59bf76a3e02630bcd1aa9791faa8b5.zip |
[PATCH] ALSA hda-codec - Fix NULL dereference in generic hda code
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>
-rw-r--r-- | sound/pci/hda/hda_generic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 97e9af130b7..1589d2f2917 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -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"; |