diff options
Diffstat (limited to 'sound/pci/ctxfi')
-rw-r--r-- | sound/pci/ctxfi/ctamixer.c | 14 | ||||
-rw-r--r-- | sound/pci/ctxfi/ctdaio.c | 4 | ||||
-rw-r--r-- | sound/pci/ctxfi/ctsrc.c | 7 |
3 files changed, 11 insertions, 14 deletions
diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c index a1db51b3ead8..a7f4a671f7b7 100644 --- a/sound/pci/ctxfi/ctamixer.c +++ b/sound/pci/ctxfi/ctamixer.c | |||
@@ -242,13 +242,12 @@ static int get_amixer_rsc(struct amixer_mgr *mgr, | |||
242 | 242 | ||
243 | /* Allocate mem for amixer resource */ | 243 | /* Allocate mem for amixer resource */ |
244 | amixer = kzalloc(sizeof(*amixer), GFP_KERNEL); | 244 | amixer = kzalloc(sizeof(*amixer), GFP_KERNEL); |
245 | if (NULL == amixer) { | 245 | if (!amixer) |
246 | err = -ENOMEM; | 246 | return -ENOMEM; |
247 | return err; | ||
248 | } | ||
249 | 247 | ||
250 | /* Check whether there are sufficient | 248 | /* Check whether there are sufficient |
251 | * amixer resources to meet request. */ | 249 | * amixer resources to meet request. */ |
250 | err = 0; | ||
252 | spin_lock_irqsave(&mgr->mgr_lock, flags); | 251 | spin_lock_irqsave(&mgr->mgr_lock, flags); |
253 | for (i = 0; i < desc->msr; i++) { | 252 | for (i = 0; i < desc->msr; i++) { |
254 | err = mgr_get_resource(&mgr->mgr, 1, &idx); | 253 | err = mgr_get_resource(&mgr->mgr, 1, &idx); |
@@ -397,12 +396,11 @@ static int get_sum_rsc(struct sum_mgr *mgr, | |||
397 | 396 | ||
398 | /* Allocate mem for sum resource */ | 397 | /* Allocate mem for sum resource */ |
399 | sum = kzalloc(sizeof(*sum), GFP_KERNEL); | 398 | sum = kzalloc(sizeof(*sum), GFP_KERNEL); |
400 | if (NULL == sum) { | 399 | if (!sum) |
401 | err = -ENOMEM; | 400 | return -ENOMEM; |
402 | return err; | ||
403 | } | ||
404 | 401 | ||
405 | /* Check whether there are sufficient sum resources to meet request. */ | 402 | /* Check whether there are sufficient sum resources to meet request. */ |
403 | err = 0; | ||
406 | spin_lock_irqsave(&mgr->mgr_lock, flags); | 404 | spin_lock_irqsave(&mgr->mgr_lock, flags); |
407 | for (i = 0; i < desc->msr; i++) { | 405 | for (i = 0; i < desc->msr; i++) { |
408 | err = mgr_get_resource(&mgr->mgr, 1, &idx); | 406 | err = mgr_get_resource(&mgr->mgr, 1, &idx); |
diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c index 082e35c08c02..deb6cfa73600 100644 --- a/sound/pci/ctxfi/ctdaio.c +++ b/sound/pci/ctxfi/ctdaio.c | |||
@@ -57,9 +57,9 @@ struct daio_rsc_idx idx_20k1[NUM_DAIOTYP] = { | |||
57 | 57 | ||
58 | struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = { | 58 | struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = { |
59 | [LINEO1] = {.left = 0x40, .right = 0x41}, | 59 | [LINEO1] = {.left = 0x40, .right = 0x41}, |
60 | [LINEO2] = {.left = 0x70, .right = 0x71}, | 60 | [LINEO2] = {.left = 0x60, .right = 0x61}, |
61 | [LINEO3] = {.left = 0x50, .right = 0x51}, | 61 | [LINEO3] = {.left = 0x50, .right = 0x51}, |
62 | [LINEO4] = {.left = 0x60, .right = 0x61}, | 62 | [LINEO4] = {.left = 0x70, .right = 0x71}, |
63 | [LINEIM] = {.left = 0x45, .right = 0xc5}, | 63 | [LINEIM] = {.left = 0x45, .right = 0xc5}, |
64 | [SPDIFOO] = {.left = 0x00, .right = 0x01}, | 64 | [SPDIFOO] = {.left = 0x00, .right = 0x01}, |
65 | [SPDIFIO] = {.left = 0x05, .right = 0x85}, | 65 | [SPDIFIO] = {.left = 0x05, .right = 0x85}, |
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, | |||
724 | 724 | ||
725 | /* Allocate mem for SRCIMP resource */ | 725 | /* Allocate mem for SRCIMP resource */ |
726 | srcimp = kzalloc(sizeof(*srcimp), GFP_KERNEL); | 726 | srcimp = kzalloc(sizeof(*srcimp), GFP_KERNEL); |
727 | if (NULL == srcimp) { | 727 | if (!srcimp) |
728 | err = -ENOMEM; | 728 | return -ENOMEM; |
729 | return err; | ||
730 | } | ||
731 | 729 | ||
732 | /* Check whether there are sufficient SRCIMP resources. */ | 730 | /* Check whether there are sufficient SRCIMP resources. */ |
731 | err = 0; | ||
733 | spin_lock_irqsave(&mgr->mgr_lock, flags); | 732 | spin_lock_irqsave(&mgr->mgr_lock, flags); |
734 | for (i = 0; i < desc->msr; i++) { | 733 | for (i = 0; i < desc->msr; i++) { |
735 | err = mgr_get_resource(&mgr->mgr, 1, &idx); | 734 | err = mgr_get_resource(&mgr->mgr, 1, &idx); |