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/cthw20k2.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/cthw20k2.c')
-rw-r--r-- | sound/pci/ctxfi/cthw20k2.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 0c4db2dcab07..b6b11bfe7574 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c | |||
@@ -166,7 +166,7 @@ static int src_get_rsc_ctrl_blk(void **rblk) | |||
166 | 166 | ||
167 | *rblk = NULL; | 167 | *rblk = NULL; |
168 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); | 168 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); |
169 | if (NULL == blk) | 169 | if (!blk) |
170 | return -ENOMEM; | 170 | return -ENOMEM; |
171 | 171 | ||
172 | *rblk = blk; | 172 | *rblk = blk; |
@@ -492,7 +492,7 @@ static int src_mgr_get_ctrl_blk(void **rblk) | |||
492 | 492 | ||
493 | *rblk = NULL; | 493 | *rblk = NULL; |
494 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); | 494 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); |
495 | if (NULL == blk) | 495 | if (!blk) |
496 | return -ENOMEM; | 496 | return -ENOMEM; |
497 | 497 | ||
498 | *rblk = blk; | 498 | *rblk = blk; |
@@ -513,7 +513,7 @@ static int srcimp_mgr_get_ctrl_blk(void **rblk) | |||
513 | 513 | ||
514 | *rblk = NULL; | 514 | *rblk = NULL; |
515 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); | 515 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); |
516 | if (NULL == blk) | 516 | if (!blk) |
517 | return -ENOMEM; | 517 | return -ENOMEM; |
518 | 518 | ||
519 | *rblk = blk; | 519 | *rblk = blk; |
@@ -702,7 +702,7 @@ static int amixer_rsc_get_ctrl_blk(void **rblk) | |||
702 | 702 | ||
703 | *rblk = NULL; | 703 | *rblk = NULL; |
704 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); | 704 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); |
705 | if (NULL == blk) | 705 | if (!blk) |
706 | return -ENOMEM; | 706 | return -ENOMEM; |
707 | 707 | ||
708 | *rblk = blk; | 708 | *rblk = blk; |
@@ -891,7 +891,7 @@ static int dai_get_ctrl_blk(void **rblk) | |||
891 | 891 | ||
892 | *rblk = NULL; | 892 | *rblk = NULL; |
893 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); | 893 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); |
894 | if (NULL == blk) | 894 | if (!blk) |
895 | return -ENOMEM; | 895 | return -ENOMEM; |
896 | 896 | ||
897 | *rblk = blk; | 897 | *rblk = blk; |
@@ -941,7 +941,7 @@ static int dao_get_ctrl_blk(void **rblk) | |||
941 | 941 | ||
942 | *rblk = NULL; | 942 | *rblk = NULL; |
943 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); | 943 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); |
944 | if (NULL == blk) | 944 | if (!blk) |
945 | return -ENOMEM; | 945 | return -ENOMEM; |
946 | 946 | ||
947 | *rblk = blk; | 947 | *rblk = blk; |
@@ -1092,7 +1092,7 @@ static int daio_mgr_get_ctrl_blk(struct hw *hw, void **rblk) | |||
1092 | 1092 | ||
1093 | *rblk = NULL; | 1093 | *rblk = NULL; |
1094 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); | 1094 | blk = kzalloc(sizeof(*blk), GFP_KERNEL); |
1095 | if (NULL == blk) | 1095 | if (!blk) |
1096 | return -ENOMEM; | 1096 | return -ENOMEM; |
1097 | 1097 | ||
1098 | for (i = 0; i < 8; i++) { | 1098 | for (i = 0; i < 8; i++) { |
@@ -1904,7 +1904,7 @@ static int hw_card_start(struct hw *hw) | |||
1904 | hw->io_base = pci_resource_start(hw->pci, 2); | 1904 | hw->io_base = pci_resource_start(hw->pci, 2); |
1905 | hw->mem_base = (unsigned long)ioremap(hw->io_base, | 1905 | hw->mem_base = (unsigned long)ioremap(hw->io_base, |
1906 | pci_resource_len(hw->pci, 2)); | 1906 | pci_resource_len(hw->pci, 2)); |
1907 | if (NULL == (void *)hw->mem_base) { | 1907 | if (!hw->mem_base) { |
1908 | err = -ENOENT; | 1908 | err = -ENOENT; |
1909 | goto error2; | 1909 | goto error2; |
1910 | } | 1910 | } |
@@ -1962,7 +1962,7 @@ static int hw_card_shutdown(struct hw *hw) | |||
1962 | 1962 | ||
1963 | hw->irq = -1; | 1963 | hw->irq = -1; |
1964 | 1964 | ||
1965 | if (NULL != ((void *)hw->mem_base)) | 1965 | if (hw->mem_base) |
1966 | iounmap((void *)hw->mem_base); | 1966 | iounmap((void *)hw->mem_base); |
1967 | 1967 | ||
1968 | hw->mem_base = (unsigned long)NULL; | 1968 | hw->mem_base = (unsigned long)NULL; |