Commit 6afeb11d authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] hda-codec - Fix NULL dereference in generic hda code

Fix NULL dereference in hda_generic.c.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent f9cc8a8b
...@@ -485,8 +485,9 @@ static const char *get_input_type(struct hda_gnode *node, unsigned int *pinctl) ...@@ -485,8 +485,9 @@ static const char *get_input_type(struct hda_gnode *node, unsigned int *pinctl)
return "Front Aux"; return "Front Aux";
return "Aux"; return "Aux";
case AC_JACK_MIC_IN: case AC_JACK_MIC_IN:
if (node->pin_caps & if (pinctl &&
(AC_PINCAP_VREF_80 << AC_PINCAP_VREF_SHIFT)) (node->pin_caps &
(AC_PINCAP_VREF_80 << AC_PINCAP_VREF_SHIFT)))
*pinctl |= AC_PINCTL_VREF_80; *pinctl |= AC_PINCTL_VREF_80;
if ((location & 0x0f) == AC_JACK_LOC_FRONT) if ((location & 0x0f) == AC_JACK_LOC_FRONT)
return "Front Mic"; return "Front Mic";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment