1
linux/sound
Jesper Juhl bb617ee3f8 ALSA: cs46xx memory management fixes for cs46xx_dsp_spos_create()
When reading through sound/pci/cs46xx/dsp_spos.c I noticed a couple of
things in cs46xx_dsp_spos_create().

It seems to me that we don't always free the various memory buffers we
allocate and we also do some work (structure member assignment) early,
that is completely pointless if some of the memory allocations fail and
we end up just aborting the whole thing.

I don't have hardware to test, so the patch below is compile tested only,
but it makes the following changes:

- Make sure we always free all allocated memory on failures.
- Don't do pointless work assigning to structure members before we know
  all memory allocations, that may abort progress, have completed
  successfully.
- Remove some trailing whitespace.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-01 10:26:23 +01:00
..
aoa of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
arm
atmel ALSA: atmel: set "channel A event" output to debug 2010-06-08 16:42:02 +02:00
core Merge branch 'fix/misc' into topic/misc 2010-10-17 10:38:33 +02:00
drivers Merge remote branch 'alsa/devel' into topic/misc 2010-10-20 12:22:11 +02:00
i2c Merge branch 'fix/misc' into topic/misc 2010-10-11 13:45:22 +02:00
isa Merge branch 'fix/misc' into topic/misc 2010-09-09 10:51:45 +02:00
mips
oss sound/oss/sb_ess.c: delete double assignment 2010-10-26 21:28:05 +02:00
parisc
pci ALSA: cs46xx memory management fixes for cs46xx_dsp_spos_create() 2010-11-01 10:26:23 +01:00
pcmcia pcmcia: do not use io_req_t when calling pcmcia_request_io() 2010-08-03 09:04:11 +02:00
ppc ALSA: sound/ppc/powermac: remove undefined operations 2010-09-14 16:19:34 +02:00
sh
soc ASoC: sound/wm9090: add missing __devexit marker 2010-10-27 07:53:43 +02:00
sparc of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
spi ALSA: sound/spi: patch for the unuseful variable removal 2010-06-08 16:51:27 +02:00
synth ALSA: emux: Add trivial compat ioctl handler 2010-09-14 16:18:11 +02:00
usb ALSA: usb - driver neglects kmalloc return value check and may deref NULL 2010-11-01 10:23:39 +01:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c sound: push BKL into open functions 2010-07-12 17:41:05 +02:00
sound_firmware.c