summaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi/ctsrc.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-26 11:07:05 +0200
committerTakashi Iwai <tiwai@suse.de>2009-07-26 11:07:05 +0200
commitf35e2965b238bbfd6d3be8969361b5769ed247ed (patch)
treed6f9f1a12c867c58beb4123bcc28c56ab3671736 /sound/pci/ctxfi/ctsrc.c
parentMerge branch 'fix/caiaq' into for-linus (diff)
parentALSA: ctxfi - Fix uninitialized error checks (diff)
downloadlinux-f35e2965b238bbfd6d3be8969361b5769ed247ed.tar.xz
linux-f35e2965b238bbfd6d3be8969361b5769ed247ed.zip
Merge branch 'fix/ctxfi' into for-linus
* fix/ctxfi: ALSA: ctxfi - Fix uninitialized error checks
Diffstat (limited to 'sound/pci/ctxfi/ctsrc.c')
-rw-r--r--sound/pci/ctxfi/ctsrc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/pci/ctxfi/ctsrc.c b/sound/pci/ctxfi/ctsrc.c
index e1c145d8b702..df43a5cd3938 100644
--- a/sound/pci/ctxfi/ctsrc.c
+++ b/sound/pci/ctxfi/ctsrc.c
@@ -724,12 +724,11 @@ static int get_srcimp_rsc(struct srcimp_mgr *mgr,
/* Allocate mem for SRCIMP resource */
srcimp = kzalloc(sizeof(*srcimp), GFP_KERNEL);
- if (NULL == srcimp) {
- err = -ENOMEM;
- return err;
- }
+ if (!srcimp)
+ return -ENOMEM;
/* Check whether there are sufficient SRCIMP resources. */
+ err = 0;
spin_lock_irqsave(&mgr->mgr_lock, flags);
for (i = 0; i < desc->msr; i++) {
err = mgr_get_resource(&mgr->mgr, 1, &idx);