Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: usb-6fire: Modify firmware version check

Check only the uppermost 16 bits instead of the whole 32 bits of
the version information. Do this because all firmware version tested
with this version information worked correctly and the strict check
causes problems for several users.

Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Torsten Schenk and committed by
Takashi Iwai
d47333dd e6135fe9

+3 -3
+3 -3
sound/usb/6fire/firmware.c
··· 42 42 0x94, 0x01, 0x5c, 0x02 /* alt 3: 404 EP2 and 604 EP6 (25 fpp) */ 43 43 }; 44 44 45 - static const u8 known_fw_versions[][4] = { 46 - { 0x03, 0x01, 0x0b, 0x00 } 45 + static const u8 known_fw_versions[][2] = { 46 + { 0x03, 0x01 } 47 47 }; 48 48 49 49 struct ihex_record { ··· 343 343 int i; 344 344 345 345 for (i = 0; i < ARRAY_SIZE(known_fw_versions); i++) 346 - if (!memcmp(version, known_fw_versions + i, 4)) 346 + if (!memcmp(version, known_fw_versions + i, 2)) 347 347 return 0; 348 348 349 349 snd_printk(KERN_ERR PREFIX "invalid fimware version in device: %*ph. "