Skip to content

Commit

Permalink
ALSA: hda - make sure alc268 does not OOPS on codec parse
Browse files Browse the repository at this point in the history
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: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
David Henningsson authored and Takashi Iwai committed Jul 18, 2012
1 parent f0913cd commit 639aa4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/pci/hda/hda_auto_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 639aa4b

Please sign in to comment.