summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_auto_parser.c
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2012-07-18 18:02:53 +0200
committerTakashi Iwai <tiwai@suse.de>2012-07-18 18:07:03 +0200
commit639aa4bd58582f3015ae5621b7e9e754dcb58e6b (patch)
tree2a9c2995f016c2fefa3a7d94e108dd939abfcba2 /sound/pci/hda/hda_auto_parser.c
parentf0913cd16e8a6608cf9558ccbe8fdf4d428ca3de (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>
Diffstat (limited to 'sound/pci/hda/hda_auto_parser.c')
-rw-r--r--sound/pci/hda/hda_auto_parser.c4
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 f7520b9f909..647218d69f6 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,
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);