aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/wavefront/wavefront_fx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/wavefront/wavefront_fx.c')
-rw-r--r--sound/isa/wavefront/wavefront_fx.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c
index 3a8c0565d676..0e948a9a7205 100644
--- a/sound/isa/wavefront/wavefront_fx.c
+++ b/sound/isa/wavefront/wavefront_fx.c
@@ -256,21 +256,21 @@ snd_wavefront_fx_start (snd_wavefront_t *dev)
256{ 256{
257 unsigned int i; 257 unsigned int i;
258 int err; 258 int err;
259 const struct firmware *firmware; 259 const struct firmware *firmware = NULL;
260 260
261 if (dev->fx_initialized) 261 if (dev->fx_initialized)
262 return 0; 262 return 0;
263 263
264#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
265 firmware = &yss225_registers_firmware;
266#else
264 err = request_firmware(&firmware, "yamaha/yss225_registers.bin", 267 err = request_firmware(&firmware, "yamaha/yss225_registers.bin",
265 dev->card->dev); 268 dev->card->dev);
266 if (err < 0) { 269 if (err < 0) {
267#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
268 firmware = &yss225_registers_firmware;
269#else
270 err = -1; 270 err = -1;
271 goto out; 271 goto out;
272#endif
273 } 272 }
273#endif
274 274
275 for (i = 0; i + 1 < firmware->size; i += 2) { 275 for (i = 0; i + 1 < firmware->size; i += 2) {
276 if (firmware->data[i] >= 8 && firmware->data[i] < 16) { 276 if (firmware->data[i] >= 8 && firmware->data[i] < 16) {
@@ -293,9 +293,8 @@ snd_wavefront_fx_start (snd_wavefront_t *dev)
293 err = 0; 293 err = 0;
294 294
295out: 295out:
296#ifdef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL 296#ifndef CONFIG_SND_WAVEFRONT_FIRMWARE_IN_KERNEL
297 if (firmware != &yss225_registers_firmware) 297 release_firmware(firmware);
298#endif 298#endif
299 release_firmware(firmware);
300 return err; 299 return err;
301} 300}