diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-07-22 11:12:34 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-07-22 11:12:34 -0400 |
commit | 35ebf6e7210dc0f7c612856513a8489a1da9de7e (patch) | |
tree | c5a2e24e80ff0202740b0c7f2ef193a334c464d6 /sound/pci/ctxfi/ctsrc.c | |
parent | 89e1b9511fc7fbfac4139fca5531f5f9d946c537 (diff) |
ALSA: ctxfi - Simple code clean up
- replace NULL == xxx with !xxx
- replace NULL != xxx with xxx
- similar trivial cleanups
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/ctsrc.c')
-rw-r--r-- | sound/pci/ctxfi/ctsrc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/ctxfi/ctsrc.c b/sound/pci/ctxfi/ctsrc.c index df43a5cd3938..c749fa720889 100644 --- a/sound/pci/ctxfi/ctsrc.c +++ b/sound/pci/ctxfi/ctsrc.c | |||
@@ -441,7 +441,7 @@ get_src_rsc(struct src_mgr *mgr, const struct src_desc *desc, struct src **rsrc) | |||
441 | else | 441 | else |
442 | src = kzalloc(sizeof(*src), GFP_KERNEL); | 442 | src = kzalloc(sizeof(*src), GFP_KERNEL); |
443 | 443 | ||
444 | if (NULL == src) { | 444 | if (!src) { |
445 | err = -ENOMEM; | 445 | err = -ENOMEM; |
446 | goto error1; | 446 | goto error1; |
447 | } | 447 | } |
@@ -550,7 +550,7 @@ int src_mgr_create(void *hw, struct src_mgr **rsrc_mgr) | |||
550 | 550 | ||
551 | *rsrc_mgr = NULL; | 551 | *rsrc_mgr = NULL; |
552 | src_mgr = kzalloc(sizeof(*src_mgr), GFP_KERNEL); | 552 | src_mgr = kzalloc(sizeof(*src_mgr), GFP_KERNEL); |
553 | if (NULL == src_mgr) | 553 | if (!src_mgr) |
554 | return -ENOMEM; | 554 | return -ENOMEM; |
555 | 555 | ||
556 | err = rsc_mgr_init(&src_mgr->mgr, SRC, SRC_RESOURCE_NUM, hw); | 556 | err = rsc_mgr_init(&src_mgr->mgr, SRC, SRC_RESOURCE_NUM, hw); |
@@ -679,7 +679,7 @@ static int srcimp_rsc_init(struct srcimp *srcimp, | |||
679 | /* Reserve memory for imapper nodes */ | 679 | /* Reserve memory for imapper nodes */ |
680 | srcimp->imappers = kzalloc(sizeof(struct imapper)*desc->msr, | 680 | srcimp->imappers = kzalloc(sizeof(struct imapper)*desc->msr, |
681 | GFP_KERNEL); | 681 | GFP_KERNEL); |
682 | if (NULL == srcimp->imappers) { | 682 | if (!srcimp->imappers) { |
683 | err = -ENOMEM; | 683 | err = -ENOMEM; |
684 | goto error1; | 684 | goto error1; |
685 | } | 685 | } |
@@ -833,7 +833,7 @@ int srcimp_mgr_create(void *hw, struct srcimp_mgr **rsrcimp_mgr) | |||
833 | 833 | ||
834 | *rsrcimp_mgr = NULL; | 834 | *rsrcimp_mgr = NULL; |
835 | srcimp_mgr = kzalloc(sizeof(*srcimp_mgr), GFP_KERNEL); | 835 | srcimp_mgr = kzalloc(sizeof(*srcimp_mgr), GFP_KERNEL); |
836 | if (NULL == srcimp_mgr) | 836 | if (!srcimp_mgr) |
837 | return -ENOMEM; | 837 | return -ENOMEM; |
838 | 838 | ||
839 | err = rsc_mgr_init(&srcimp_mgr->mgr, SRCIMP, SRCIMP_RESOURCE_NUM, hw); | 839 | err = rsc_mgr_init(&srcimp_mgr->mgr, SRCIMP, SRCIMP_RESOURCE_NUM, hw); |
@@ -844,7 +844,7 @@ int srcimp_mgr_create(void *hw, struct srcimp_mgr **rsrcimp_mgr) | |||
844 | spin_lock_init(&srcimp_mgr->imap_lock); | 844 | spin_lock_init(&srcimp_mgr->imap_lock); |
845 | INIT_LIST_HEAD(&srcimp_mgr->imappers); | 845 | INIT_LIST_HEAD(&srcimp_mgr->imappers); |
846 | entry = kzalloc(sizeof(*entry), GFP_KERNEL); | 846 | entry = kzalloc(sizeof(*entry), GFP_KERNEL); |
847 | if (NULL == entry) { | 847 | if (!entry) { |
848 | err = -ENOMEM; | 848 | err = -ENOMEM; |
849 | goto error2; | 849 | goto error2; |
850 | } | 850 | } |