diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-01-16 11:28:38 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 13:02:47 +0300 |
commit | 7f6e3cbbd60044102373f5a7f86d5f4e89a99747 (patch) | |
tree | 13529c04b221250df43fc9691649813b71601fe4 /sound/core | |
parent | 8877331177deabbb1561a43ec5c2d94c3c68766d (diff) | |
download | linux-7f6e3cbbd60044102373f5a7f86d5f4e89a99747.tar.xz |
ALSA: core: Fix SSID quirk lookup for subvendor=0
commit 5576c4f24c56722a2d9fb9c447d896e5b312078b upstream.
Some weird devices set the codec SSID vendor ID 0, and
snd_pci_quirk_lookup_id() loop aborts at the point although it should
still try matching with the SSID device ID. This resulted in a
missing quirk for some old Macs.
Fix the loop termination condition to check both subvendor and
subdevice.
Fixes: 73355ddd8775 ("ALSA: hda: Code refactoring snd_hda_pick_fixup()")
Cc: <stable@vger.kernel.org>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215495
Link: https://lore.kernel.org/r/20220116082838.19382-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/misc.c b/sound/core/misc.c index 3579dd7a161f..50e4aaa6270d 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c @@ -112,7 +112,7 @@ snd_pci_quirk_lookup_id(u16 vendor, u16 device, { const struct snd_pci_quirk *q; - for (q = list; q->subvendor; q++) { + for (q = list; q->subvendor || q->subdevice; q++) { if (q->subvendor != vendor) continue; if (!q->subdevice || |