summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2012-04-10 13:05:29 +0200
committerBen Hutchings <ben@decadent.org.uk>2012-10-30 23:26:28 +0000
commit810352f7bc7ee8788c89660bec3b7790e1c215bc (patch)
treede3d4eb2940f421d3f3612e41c26645788878cef /sound/pci
parenta8cfa724f6059e312e7a10f3116f4d028842d73c (diff)
ALSA: hda - Fix oops caused by recent commit "Fix internal mic for Lenovo Ideapad U300s"
commit 83b0c6ba999643ee8ad6329f26e1cdc870e1a920 upstream. Make sure we don't dereference the "quirk" pointer when it is null. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_conexant.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 94f0c4ade23b..58c287be6b4c 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -4463,7 +4463,9 @@ static void apply_fixup(struct hda_codec *codec,
struct conexant_spec *spec = codec->spec;
quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk);
- if (quirk && table[quirk->value]) {
+ if (!quirk)
+ return;
+ if (table[quirk->value]) {
snd_printdd(KERN_INFO "hda_codec: applying pincfg for %s\n",
quirk->name);
apply_pincfg(codec, table[quirk->value]);