提交 639aa4bd 编写于 作者: D David Henningsson 提交者: Takashi Iwai

ALSA: hda - make sure alc268 does not OOPS on codec parse

A recent commit made patch_alc268 call snd_hda_pick_fixup with
NULL quirk pointer. Make sure we do not reference that NULL pointer.
Signed-off-by: NDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 f0913cd1
......@@ -727,7 +727,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
models++;
}
}
if (id < 0) {
if (id < 0 && quirk) {
q = snd_pci_quirk_lookup(codec->bus->pci, quirk);
if (q) {
id = q->value;
......@@ -736,7 +736,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
#endif
}
}
if (id < 0) {
if (id < 0 && quirk) {
for (q = quirk; q->subvendor; q++) {
unsigned int vendorid =
q->subdevice | (q->subvendor << 16);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册