OpenCloudOS-Kernel/sound/pci/cs46xx
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
..
imgs tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
Makefile [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-16 16:51:18 +02:00
cs46xx.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
cs46xx_image.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cs46xx_lib.c ALSA: info - Check file position validity in common layer 2010-04-13 12:01:14 +02:00
cs46xx_lib.h ALSA: cs46xx - Fix minimum period size 2009-09-08 10:59:49 +02:00
dsp_spos.c ALSA: cs46xx memory management fixes for cs46xx_dsp_spos_create() 2010-11-01 10:26:23 +01:00
dsp_spos.h ALSA: cs46xx - Fix suspend/resume with new DSP 2009-12-22 09:00:14 +01:00
dsp_spos_scb_lib.c ALSA: cs46xx - Fix suspend/resume with new DSP 2009-12-22 09:00:14 +01:00