aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/pci/nm256
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-01-03 22:55:54 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-04 15:13:45 +0100
commitff6defa6a8fae12205d64f55db395b1fcf35af8e (patch)
treea08b5c63a0c7e21f955e254178dc53ea0d7b6e3f /sound/pci/nm256
parentALSA: sb: Delete an unnecessary check before the function call "snd_emux_free" (diff)
downloadwireguard-linux-ff6defa6a8fae12205d64f55db395b1fcf35af8e.tar.xz
wireguard-linux-ff6defa6a8fae12205d64f55db395b1fcf35af8e.zip
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/nm256')
-rw-r--r--sound/pci/nm256/nm256.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
index 4e41a4e29a1e..3f52a44143a5 100644
--- a/sound/pci/nm256/nm256.c
+++ b/sound/pci/nm256/nm256.c
@@ -1460,10 +1460,8 @@ static int snd_nm256_free(struct nm256 *chip)
if (chip->irq >= 0)
free_irq(chip->irq, chip);
- if (chip->cport)
- iounmap(chip->cport);
- if (chip->buffer)
- iounmap(chip->buffer);
+ iounmap(chip->cport);
+ iounmap(chip->buffer);
release_and_free_resource(chip->res_cport);
release_and_free_resource(chip->res_buffer);