diff options
author | David Henningsson <david.henningsson@canonical.com> | 2012-07-18 12:02:53 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-07-18 12:07:03 -0400 |
commit | 639aa4bd58582f3015ae5621b7e9e754dcb58e6b (patch) | |
tree | 2a9c2995f016c2fefa3a7d94e108dd939abfcba2 | |
parent | f0913cd16e8a6608cf9558ccbe8fdf4d428ca3de (diff) |
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: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/hda_auto_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index f7520b9f909c..647218d69f68 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c | |||
@@ -727,7 +727,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec, | |||
727 | models++; | 727 | models++; |
728 | } | 728 | } |
729 | } | 729 | } |
730 | if (id < 0) { | 730 | if (id < 0 && quirk) { |
731 | q = snd_pci_quirk_lookup(codec->bus->pci, quirk); | 731 | q = snd_pci_quirk_lookup(codec->bus->pci, quirk); |
732 | if (q) { | 732 | if (q) { |
733 | id = q->value; | 733 | id = q->value; |
@@ -736,7 +736,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec, | |||
736 | #endif | 736 | #endif |
737 | } | 737 | } |
738 | } | 738 | } |
739 | if (id < 0) { | 739 | if (id < 0 && quirk) { |
740 | for (q = quirk; q->subvendor; q++) { | 740 | for (q = quirk; q->subvendor; q++) { |
741 | unsigned int vendorid = | 741 | unsigned int vendorid = |
742 | q->subdevice | (q->subvendor << 16); | 742 | q->subdevice | (q->subvendor << 16); |