diff options
author | David Henningsson <david.henningsson@canonical.com> | 2012-04-10 07:05:29 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-10 08:55:01 -0400 |
commit | 83b0c6ba999643ee8ad6329f26e1cdc870e1a920 (patch) | |
tree | f1b501a536c74d018987a4915689c2ef0dd3cd59 /sound/pci | |
parent | 5ff5c3a4ab0d638fa63e939e75727c233b681e8d (diff) |
ALSA: hda - Fix oops caused by recent commit "Fix internal mic for Lenovo Ideapad U300s"
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>
Diffstat (limited to 'sound/pci')
-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 cbe115b6c80c..abb59f472d48 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -4441,7 +4441,9 @@ static void apply_fixup(struct hda_codec *codec, | |||
4441 | struct conexant_spec *spec = codec->spec; | 4441 | struct conexant_spec *spec = codec->spec; |
4442 | 4442 | ||
4443 | quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk); | 4443 | quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk); |
4444 | if (quirk && table[quirk->value]) { | 4444 | if (!quirk) |
4445 | return; | ||
4446 | if (table[quirk->value]) { | ||
4445 | snd_printdd(KERN_INFO "hda_codec: applying pincfg for %s\n", | 4447 | snd_printdd(KERN_INFO "hda_codec: applying pincfg for %s\n", |
4446 | quirk->name); | 4448 | quirk->name); |
4447 | apply_pincfg(codec, table[quirk->value]); | 4449 | apply_pincfg(codec, table[quirk->value]); |