diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-03 08:48:22 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-03 08:48:22 +0200 |
commit | 0d7e92da50763b53b59b490ce57a323039ee241d (patch) | |
tree | 9a1ee0292fce0243406f2e66c170d25e062730a2 /sound/pci/asihpi/hpidspcd.c | |
parent | oom: task->mm == NULL doesn't mean the memory was freed (diff) | |
parent | Merge branch 'fix/asoc' into for-linus (diff) | |
download | linux-0d7e92da50763b53b59b490ce57a323039ee241d.tar.xz linux-0d7e92da50763b53b59b490ce57a323039ee241d.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: asihpi - Clarify adapter index validity check
ALSA: asihpi - Don't leak firmware if mem alloc fails
ALSA: rtctimer.c needs module.h
ASoC: Fix txx9aclc.c build
ALSA: hdspm - Add firmware revision 0xcc for RME MADI
ALSA: hdspm - Fix reported external sample rate on RME MADI and MADIface
ALSA: hdspm - Provide MADI speed mode selector on RME MADI and MADIface
ALSA: sound/core/pcm_compat.c: adjust array index
Diffstat (limited to 'sound/pci/asihpi/hpidspcd.c')
-rw-r--r-- | sound/pci/asihpi/hpidspcd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c index 3a7afa31c1d8..71d32c868c92 100644 --- a/sound/pci/asihpi/hpidspcd.c +++ b/sound/pci/asihpi/hpidspcd.c @@ -43,6 +43,7 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, struct pci_dev *dev = os_data; struct code_header header; char fw_name[20]; + short err_ret = HPI_ERROR_DSP_FILE_NOT_FOUND; int err; sprintf(fw_name, "asihpi/dsp%04x.bin", adapter); @@ -85,8 +86,10 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name); dsp_code->pvt = kmalloc(sizeof(*dsp_code->pvt), GFP_KERNEL); - if (!dsp_code->pvt) - return HPI_ERROR_MEMORY_ALLOC; + if (!dsp_code->pvt) { + err_ret = HPI_ERROR_MEMORY_ALLOC; + goto error2; + } dsp_code->pvt->dev = dev; dsp_code->pvt->firmware = firmware; @@ -99,7 +102,7 @@ error2: release_firmware(firmware); error1: dsp_code->block_length = 0; - return HPI_ERROR_DSP_FILE_NOT_FOUND; + return err_ret; } /*-------------------------------------------------------------------*/ |