commit: 80c678526d7da73bde4d46a4622449c2b3c88409
From: Takashi Iwai <[email protected]>
Date: Thu, 13 Jan 2011 08:08:08 +0100
Subject: [PATCH] ALSA: hda - Fix NULL-derefence with a single mic in STAC
auto-mic detection
When only one mic is available and it's an analog mic, the current
IDT/STAC parser may give an Oops.
Reference: bko#25692
https://bugzilla.kernel.org/show_bug.cgi?id=25692
Signed-off-by: Takashi Iwai <[email protected]>
Cc: <[email protected]>
---
sound/pci/hda/patch_sigmatel.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index c8d812e..4ab019d 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -3594,7 +3594,7 @@ static int stac_check_auto_mic(struct hda_codec *codec)
if (check_mic_pin(codec, spec->dmic_nids[i],
&fixed, &ext, &dock))
return 0;
- if (!fixed && !ext && !dock)
+ if (!fixed || (!ext && !dock))
return 0; /* no input to switch */
if (!(get_wcaps(codec, ext) & AC_WCAP_UNSOL_CAP))
return 0; /* no unsol support */
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable