提交 83b0c6ba 编写于 作者: D David Henningsson 提交者: Takashi Iwai

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 5ff5c3a4
......@@ -4441,7 +4441,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]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册