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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
Markus Elfring 2015-01-03 22:55:54 +01:00 • committed by Takashi Iwai
commit ff6defa6a8
26 changed files with 43 additions and 90 deletions

View file

@ -867,16 +867,11 @@ static int snd_pmac_free(struct snd_pmac *chip)
snd_pmac_dbdma_free(chip, &chip->capture.cmd);
snd_pmac_dbdma_free(chip, &chip->extra_dma);
snd_pmac_dbdma_free(chip, &emergency_dbdma);
if (chip->macio_base)
iounmap(chip->macio_base);
if (chip->latch_base)
iounmap(chip->latch_base);
if (chip->awacs)
iounmap(chip->awacs);
if (chip->playback.dma)
iounmap(chip->playback.dma);
if (chip->capture.dma)
iounmap(chip->capture.dma);
iounmap(chip->macio_base);
iounmap(chip->latch_base);
iounmap(chip->awacs);
iounmap(chip->playback.dma);
iounmap(chip->capture.dma);
if (chip->node) {
int i;