linux/sound/pci
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
..
ac97 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ali5451 sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
asihpi ALSA: asihpi - Return hw error directly from oustream_write. 2010-08-28 11:55:07 +02:00
au88x0 sound: fixed typos 2010-10-17 10:08:27 +02:00
aw2 ALSA: aw2-alsa.c: use pci_ids.h defines and fix checkpatch.pl noise 2010-05-25 08:39:28 +02:00
ca0106 ALSA: ca0106: Use card specific dac id for mute controls. 2010-10-23 16:59:53 +02:00
cs46xx ALSA: cs46xx memory management fixes for cs46xx_dsp_spos_create() 2010-11-01 10:26:23 +01:00
cs5535audio include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ctxfi include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
echoaudio ALSA: echoaudio: check kmalloc() result 2010-07-19 17:59:04 +02:00
emu10k1 sound: Remove unnecessary casts of private_data 2010-09-07 08:05:59 +02:00
hda ALSA: hda - Change BTL amp level on some HP notebooks 2010-10-25 20:08:36 +02:00
ice1712 sound: Remove unnecessary casts of private_data 2010-09-07 08:05:59 +02:00
korg1212 sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
lx6464es include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mixart ALSA: info - Implement common llseek for binary mode 2010-04-13 12:01:20 +02:00
nm256 sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
oxygen Merge branch 'fix/misc' into topic/misc 2010-10-11 13:45:22 +02:00
pcxhr sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
riptide ALSA: riptide - Fix detection / load of firmware files 2010-08-16 08:08:48 +02:00
rme9652 Merge branch 'fix/misc' into topic/misc 2010-10-11 13:45:22 +02:00
trident fix typos concerning "initiali[zs]e" 2010-06-16 18:05:05 +02:00
vx222 sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
ymfpci sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
Kconfig ALSA: virtuoso: update Kconfig text 2010-09-09 10:53:43 +02:00
Makefile ALSA: Add support of AudioScience ASI boards 2010-04-22 07:21:53 +02:00
ad1889.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
ad1889.h
ak4531_codec.c
als300.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
als4000.c ALSA: als4000: Fix potentially invalid DMA mode setup 2010-08-04 23:18:33 +02:00
atiixp.c Merge branch 'fix/misc' into topic/misc 2010-02-17 14:24:46 +01:00
atiixp_modem.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
azt3328.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
azt3328.h
bt87x.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
cmipci.c ALSA: cmipci: work around invalid PCM pointer 2010-03-24 08:02:11 +01:00
cs4281.c ALSA: info - Check file position validity in common layer 2010-04-13 12:01:14 +02:00
cs5530.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ens1370.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
ens1371.c
es1938.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
es1968.c ALSA: es1968: Clear interrupts before enabling them 2010-05-08 11:51:06 +02:00
fm801.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
intel8x0.c ALSA: intel8x0: Mute External Amplifier by default for ThinkPad X31 2010-08-19 08:13:46 +02:00
intel8x0m.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
maestro3.c ALSA: maestro3: Clear interrupts before enabling them 2010-05-08 11:51:13 +02:00
rme32.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
rme96.c sound: Remove unnecessary casts of private_data 2010-09-07 08:05:59 +02:00
sis7019.c sis7019: increase reset delays 2010-06-28 09:42:22 +02:00
sis7019.h
sonicvibes.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00
via82xx.c ALSA: via82xx: allow changing the initial DXS volume 2010-07-12 17:25:27 +02:00
via82xx_modem.c sound: use DEFINE_PCI_DEVICE_TABLE 2010-02-09 11:08:33 +01:00