aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-01-03 16:55:54 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-04 09:13:45 -0500
commitff6defa6a8fae12205d64f55db395b1fcf35af8e (patch)
treea08b5c63a0c7e21f955e254178dc53ea0d7b6e3f /sound/pci/ctxfi
parentb76c0e95ab0f535e210df588b8ac42dd75b31c75 (diff)
ALSA: Deletion of checks before the function call "iounmap"
The iounmap() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi')
-rw-r--r--sound/pci/ctxfi/cthw20k1.c5
-rw-r--r--sound/pci/ctxfi/cthw20k2.c5
2 files changed, 2 insertions, 8 deletions
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c
index b425aa8ee578..b8b0d8ef9319 100644
--- a/sound/pci/ctxfi/cthw20k1.c
+++ b/sound/pci/ctxfi/cthw20k1.c
@@ -1985,10 +1985,7 @@ static int hw_card_shutdown(struct hw *hw)
1985 free_irq(hw->irq, hw); 1985 free_irq(hw->irq, hw);
1986 1986
1987 hw->irq = -1; 1987 hw->irq = -1;
1988 1988 iounmap(hw->mem_base);
1989 if (hw->mem_base)
1990 iounmap(hw->mem_base);
1991
1992 hw->mem_base = NULL; 1989 hw->mem_base = NULL;
1993 1990
1994 if (hw->io_base) 1991 if (hw->io_base)
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c
index 253899d13790..4e16b4d05eed 100644
--- a/sound/pci/ctxfi/cthw20k2.c
+++ b/sound/pci/ctxfi/cthw20k2.c
@@ -2110,10 +2110,7 @@ static int hw_card_shutdown(struct hw *hw)
2110 free_irq(hw->irq, hw); 2110 free_irq(hw->irq, hw);
2111 2111
2112 hw->irq = -1; 2112 hw->irq = -1;
2113 2113 iounmap(hw->mem_base);
2114 if (hw->mem_base)
2115 iounmap(hw->mem_base);
2116
2117 hw->mem_base = NULL; 2114 hw->mem_base = NULL;
2118 2115
2119 if (hw->io_base) 2116 if (hw->io_base)