Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6afeb11de5b28e47adea1459c35e598bb98424d6
Commit:     6afeb11de5b28e47adea1459c35e598bb98424d6
Parent:     f9cc8a8b1887e6e2bb430405d0a4f9b5fb39fa5d
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 18 16:16:04 2006 +0100
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Jan 9 09:06:17 2007 +0100

    [ALSA] hda-codec - Fix NULL dereference in generic hda code
    
    Fix NULL dereference in hda_generic.c.
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 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 97e9af1..1589d2f 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";
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to