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
arm
atmel
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
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
spi
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
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c
sound_firmware.c