summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-08-16 08:08:48 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-26 16:45:44 -0700
commit6c877dfbe9b81983e254bdd6aa8854fb2a288604 (patch)
treecbba8f7bf5c8086698f240ed7a2f375658fd3abd /sound
parent4e354ad43ae9c3b9e634cdfcb8d0920cd7278afd (diff)
downloadlwn-6c877dfbe9b81983e254bdd6aa8854fb2a288604.tar.gz
lwn-6c877dfbe9b81983e254bdd6aa8854fb2a288604.zip
ALSA: riptide - Fix detection / load of firmware files
commit a5ba6beb839cfa288960c92cd2668a2601c24dda upstream. The detection and loading of firmeware on riptide driver has been broken due to rewrite of some codes, checking the presense wrongly. This patch fixes the logic again. Reference: kernel bug 16596 https://bugzilla.kernel.org/show_bug.cgi?id=16596 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/riptide/riptide.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index ad4462677615..c737287bcae9 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -1224,15 +1224,14 @@ static int try_to_load_firmware(struct cmdif *cif, struct snd_riptide *chip)
firmware.firmware.ASIC, firmware.firmware.CODEC,
firmware.firmware.AUXDSP, firmware.firmware.PROG);
+ if (!chip)
+ return 1;
+
for (i = 0; i < FIRMWARE_VERSIONS; i++) {
if (!memcmp(&firmware_versions[i], &firmware, sizeof(firmware)))
- break;
- }
- if (i >= FIRMWARE_VERSIONS)
- return 0; /* no match */
+ return 1; /* OK */
- if (!chip)
- return 1; /* OK */
+ }
snd_printdd("Writing Firmware\n");
if (!chip->fw_entry) {