diff options
author | David Henningsson <david.henningsson@canonical.com> | 2012-04-10 13:05:29 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-07 16:02:08 -0700 |
commit | d3ecba4704c3e15008eea16333710383f7d99f62 (patch) | |
tree | 1c2ba756421e50548d7c1de2569b3f4a149fe08f /sound | |
parent | 419f4dff0eca95853a22c582e7dc754887a14a8d (diff) | |
download | lwn-d3ecba4704c3e15008eea16333710383f7d99f62.tar.gz lwn-d3ecba4704c3e15008eea16333710383f7d99f62.zip |
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>
Cc: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index a0c3ac32eb94..d4caf87615db 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -4430,7 +4430,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]); |