aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--sound/aoa/soundbus/i2sbus/core.c13
-rw-r--r--sound/arm/aaci.c4
-rw-r--r--sound/drivers/ml403-ac97cr.c3
-rw-r--r--sound/isa/msnd/msnd_pinnacle.c3
-rw-r--r--sound/parisc/harmony.c4
-rw-r--r--sound/pci/ad1889.c5
-rw-r--r--sound/pci/asihpi/hpioctl.c6
-rw-r--r--sound/pci/atiixp.c3
-rw-r--r--sound/pci/atiixp_modem.c3
-rw-r--r--sound/pci/aw2/aw2-alsa.c4
-rw-r--r--sound/pci/bt87x.c3
-rw-r--r--sound/pci/cs4281.c6
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c4
-rw-r--r--sound/pci/ctxfi/cthw20k1.c5
-rw-r--r--sound/pci/ctxfi/cthw20k2.c5
-rw-r--r--sound/pci/echoaudio/echoaudio.c6
-rw-r--r--sound/pci/hda/hda_intel.c3
-rw-r--r--sound/pci/lola/lola.c6
-rw-r--r--sound/pci/mixart/mixart.c7
-rw-r--r--sound/pci/nm256/nm256.c6
-rw-r--r--sound/pci/rme9652/hdsp.c4
-rw-r--r--sound/pci/rme9652/hdspm.c4
-rw-r--r--sound/pci/rme9652/rme9652.c3
-rw-r--r--sound/pci/sis7019.c5
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c3
-rw-r--r--sound/ppc/pmac.c15
26 files changed, 43 insertions, 90 deletions
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index 837ba99a7524..b9737fae656a 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -74,10 +74,9 @@ static void i2sbus_release_dev(struct device *dev)
74 int i; 74 int i;
75 75
76 i2sdev = container_of(dev, struct i2sbus_dev, sound.ofdev.dev); 76 i2sdev = container_of(dev, struct i2sbus_dev, sound.ofdev.dev);
77 77 iounmap(i2sdev->intfregs);
78 if (i2sdev->intfregs) iounmap(i2sdev->intfregs); 78 iounmap(i2sdev->out.dbdma);
79 if (i2sdev->out.dbdma) iounmap(i2sdev->out.dbdma); 79 iounmap(i2sdev->in.dbdma);
80 if (i2sdev->in.dbdma) iounmap(i2sdev->in.dbdma);
81 for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) 80 for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++)
82 release_and_free_resource(i2sdev->allocated_resource[i]); 81 release_and_free_resource(i2sdev->allocated_resource[i]);
83 free_dbdma_descriptor_ring(i2sdev, &i2sdev->out.dbdma_ring); 82 free_dbdma_descriptor_ring(i2sdev, &i2sdev->out.dbdma_ring);
@@ -318,9 +317,9 @@ static int i2sbus_add_dev(struct macio_dev *macio,
318 free_irq(dev->interrupts[i], dev); 317 free_irq(dev->interrupts[i], dev);
319 free_dbdma_descriptor_ring(dev, &dev->out.dbdma_ring); 318 free_dbdma_descriptor_ring(dev, &dev->out.dbdma_ring);
320 free_dbdma_descriptor_ring(dev, &dev->in.dbdma_ring); 319 free_dbdma_descriptor_ring(dev, &dev->in.dbdma_ring);
321 if (dev->intfregs) iounmap(dev->intfregs); 320 iounmap(dev->intfregs);
322 if (dev->out.dbdma) iounmap(dev->out.dbdma); 321 iounmap(dev->out.dbdma);
323 if (dev->in.dbdma) iounmap(dev->in.dbdma); 322 iounmap(dev->in.dbdma);
324 for (i=0;i<3;i++) 323 for (i=0;i<3;i++)
325 release_and_free_resource(dev->allocated_resource[i]); 324 release_and_free_resource(dev->allocated_resource[i]);
326 mutex_destroy(&dev->lock); 325 mutex_destroy(&dev->lock);
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 0e83a73efb16..4140b1b95054 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -889,8 +889,8 @@ static int aaci_probe_ac97(struct aaci *aaci)
889static void aaci_free_card(struct snd_card *card) 889static void aaci_free_card(struct snd_card *card)
890{ 890{
891 struct aaci *aaci = card->private_data; 891 struct aaci *aaci = card->private_data;
892 if (aaci->base) 892
893 iounmap(aaci->base); 893 iounmap(aaci->base);
894} 894}
895 895
896static struct aaci *aaci_init_card(struct amba_device *dev) 896static struct aaci *aaci_init_card(struct amba_device *dev)
diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c
index ec01de1cb23b..bdcb5721393b 100644
--- a/sound/drivers/ml403-ac97cr.c
+++ b/sound/drivers/ml403-ac97cr.c
@@ -1094,8 +1094,7 @@ static int snd_ml403_ac97cr_free(struct snd_ml403_ac97cr *ml403_ac97cr)
1094 if (ml403_ac97cr->capture_irq >= 0) 1094 if (ml403_ac97cr->capture_irq >= 0)
1095 free_irq(ml403_ac97cr->capture_irq, ml403_ac97cr); 1095 free_irq(ml403_ac97cr->capture_irq, ml403_ac97cr);
1096 /* give back "port" */ 1096 /* give back "port" */
1097 if (ml403_ac97cr->port != NULL) 1097 iounmap(ml403_ac97cr->port);
1098 iounmap(ml403_ac97cr->port);
1099 kfree(ml403_ac97cr); 1098 kfree(ml403_ac97cr);
1100 PDEBUG(INIT_INFO, "free(): (done)\n"); 1099 PDEBUG(INIT_INFO, "free(): (done)\n");
1101 return 0; 1100 return 0;
diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c
index 65b36825d194..4c072666115d 100644
--- a/sound/isa/msnd/msnd_pinnacle.c
+++ b/sound/isa/msnd/msnd_pinnacle.c
@@ -627,8 +627,7 @@ static int snd_msnd_attach(struct snd_card *card)
627 return 0; 627 return 0;
628 628
629err_release_region: 629err_release_region:
630 if (chip->mappedbase) 630 iounmap(chip->mappedbase);
631 iounmap(chip->mappedbase);
632 release_mem_region(chip->base, BUFFSIZE); 631 release_mem_region(chip->base, BUFFSIZE);
633 release_region(chip->io, DSP_NUMIO); 632 release_region(chip->io, DSP_NUMIO);
634 free_irq(chip->irq, chip); 633 free_irq(chip->irq, chip);
diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c
index 29604a239c44..f2350c1d6ee8 100644
--- a/sound/parisc/harmony.c
+++ b/sound/parisc/harmony.c
@@ -893,9 +893,7 @@ snd_harmony_free(struct snd_harmony *h)
893 if (h->irq >= 0) 893 if (h->irq >= 0)
894 free_irq(h->irq, h); 894 free_irq(h->irq, h);
895 895
896 if (h->iobase) 896 iounmap(h->iobase);
897 iounmap(h->iobase);
898
899 kfree(h); 897 kfree(h);
900 return 0; 898 return 0;
901} 899}
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index 547ee30540a0..0de31290411c 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -853,12 +853,9 @@ snd_ad1889_free(struct snd_ad1889 *chip)
853 free_irq(chip->irq, chip); 853 free_irq(chip->irq, chip);
854 854
855skip_hw: 855skip_hw:
856 if (chip->iobase) 856 iounmap(chip->iobase);
857 iounmap(chip->iobase);
858
859 pci_release_regions(chip->pci); 857 pci_release_regions(chip->pci);
860 pci_disable_device(chip->pci); 858 pci_disable_device(chip->pci);
861
862 kfree(chip); 859 kfree(chip);
863 return 0; 860 return 0;
864} 861}
diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c
index 72af66bdf714..67d113356971 100644
--- a/sound/pci/asihpi/hpioctl.c
+++ b/sound/pci/asihpi/hpioctl.c
@@ -541,10 +541,8 @@ void asihpi_adapter_remove(struct pci_dev *pci_dev)
541 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL); 541 hpi_send_recv_ex(&hm, &hr, HOWNER_KERNEL);
542 542
543 /* unmap PCI memory space, mapped during device init. */ 543 /* unmap PCI memory space, mapped during device init. */
544 for (idx = 0; idx < HPI_MAX_ADAPTER_MEM_SPACES; idx++) { 544 for (idx = 0; idx < HPI_MAX_ADAPTER_MEM_SPACES; ++idx)
545 if (pci.ap_mem_base[idx]) 545 iounmap(pci.ap_mem_base[idx]);
546 iounmap(pci.ap_mem_base[idx]);
547 }
548 546
549 if (pa->irq) 547 if (pa->irq)
550 free_irq(pa->irq, pa); 548 free_irq(pa->irq, pa);
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 9c1c4452a8ee..d24188fea4b6 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -1585,8 +1585,7 @@ static int snd_atiixp_free(struct atiixp *chip)
1585 __hw_end: 1585 __hw_end:
1586 if (chip->irq >= 0) 1586 if (chip->irq >= 0)
1587 free_irq(chip->irq, chip); 1587 free_irq(chip->irq, chip);
1588 if (chip->remap_addr) 1588 iounmap(chip->remap_addr);
1589 iounmap(chip->remap_addr);
1590 pci_release_regions(chip->pci); 1589 pci_release_regions(chip->pci);
1591 pci_disable_device(chip->pci); 1590 pci_disable_device(chip->pci);
1592 kfree(chip); 1591 kfree(chip);
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index b2f63e0727de..c321a97b4344 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -1211,8 +1211,7 @@ static int snd_atiixp_free(struct atiixp_modem *chip)
1211 __hw_end: 1211 __hw_end:
1212 if (chip->irq >= 0) 1212 if (chip->irq >= 0)
1213 free_irq(chip->irq, chip); 1213 free_irq(chip->irq, chip);
1214 if (chip->remap_addr) 1214 iounmap(chip->remap_addr);
1215 iounmap(chip->remap_addr);
1216 pci_release_regions(chip->pci); 1215 pci_release_regions(chip->pci);
1217 pci_disable_device(chip->pci); 1216 pci_disable_device(chip->pci);
1218 kfree(chip); 1217 kfree(chip);
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
index e1cf01949fda..8d2fee7b33bd 100644
--- a/sound/pci/aw2/aw2-alsa.c
+++ b/sound/pci/aw2/aw2-alsa.c
@@ -229,9 +229,7 @@ static int snd_aw2_dev_free(struct snd_device *device)
229 if (chip->irq >= 0) 229 if (chip->irq >= 0)
230 free_irq(chip->irq, (void *)chip); 230 free_irq(chip->irq, (void *)chip);
231 /* release the i/o ports & memory */ 231 /* release the i/o ports & memory */
232 if (chip->iobase_virt) 232 iounmap(chip->iobase_virt);
233 iounmap(chip->iobase_virt);
234
235 pci_release_regions(chip->pci); 233 pci_release_regions(chip->pci);
236 /* disable the PCI entry */ 234 /* disable the PCI entry */
237 pci_disable_device(chip->pci); 235 pci_disable_device(chip->pci);
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index 058b9973c09c..e82ceacbe64f 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -690,8 +690,7 @@ static int snd_bt87x_free(struct snd_bt87x *chip)
690 snd_bt87x_stop(chip); 690 snd_bt87x_stop(chip);
691 if (chip->irq >= 0) 691 if (chip->irq >= 0)
692 free_irq(chip->irq, chip); 692 free_irq(chip->irq, chip);
693 if (chip->mmio) 693 iounmap(chip->mmio);
694 iounmap(chip->mmio);
695 pci_release_regions(chip->pci); 694 pci_release_regions(chip->pci);
696 pci_disable_device(chip->pci); 695 pci_disable_device(chip->pci);
697 kfree(chip); 696 kfree(chip);
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index 05a4337f8116..ea339111c59f 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -1316,10 +1316,8 @@ static int snd_cs4281_free(struct cs4281 *chip)
1316 1316
1317 if (chip->irq >= 0) 1317 if (chip->irq >= 0)
1318 free_irq(chip->irq, chip); 1318 free_irq(chip->irq, chip);
1319 if (chip->ba0) 1319 iounmap(chip->ba0);
1320 iounmap(chip->ba0); 1320 iounmap(chip->ba1);
1321 if (chip->ba1)
1322 iounmap(chip->ba1);
1323 pci_release_regions(chip->pci); 1321 pci_release_regions(chip->pci);
1324 pci_disable_device(chip->pci); 1322 pci_disable_device(chip->pci);
1325 1323
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index dfec84e1a575..128bbfe80aa7 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -2949,8 +2949,8 @@ static int snd_cs46xx_free(struct snd_cs46xx *chip)
2949 2949
2950 for (idx = 0; idx < 5; idx++) { 2950 for (idx = 0; idx < 5; idx++) {
2951 struct snd_cs46xx_region *region = &chip->region.idx[idx]; 2951 struct snd_cs46xx_region *region = &chip->region.idx[idx];
2952 if (region->remap_addr) 2952
2953 iounmap(region->remap_addr); 2953 iounmap(region->remap_addr);
2954 release_and_free_resource(region->resource); 2954 release_and_free_resource(region->resource);
2955 } 2955 }
2956 2956
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)
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 21228adaa70c..98d4f35cff2e 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -1872,12 +1872,8 @@ static int snd_echo_free(struct echoaudio *chip)
1872 if (chip->comm_page) 1872 if (chip->comm_page)
1873 snd_dma_free_pages(&chip->commpage_dma_buf); 1873 snd_dma_free_pages(&chip->commpage_dma_buf);
1874 1874
1875 if (chip->dsp_registers) 1875 iounmap(chip->dsp_registers);
1876 iounmap(chip->dsp_registers);
1877
1878 release_and_free_resource(chip->iores); 1876 release_and_free_resource(chip->iores);
1879
1880
1881 pci_disable_device(chip->pci); 1877 pci_disable_device(chip->pci);
1882 1878
1883 /* release chip data */ 1879 /* release chip data */
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index d426a0bd6a5f..a9714251b159 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1138,8 +1138,7 @@ static int azx_free(struct azx *chip)
1138 free_irq(chip->irq, (void*)chip); 1138 free_irq(chip->irq, (void*)chip);
1139 if (chip->msi) 1139 if (chip->msi)
1140 pci_disable_msi(chip->pci); 1140 pci_disable_msi(chip->pci);
1141 if (chip->remap_addr) 1141 iounmap(chip->remap_addr);
1142 iounmap(chip->remap_addr);
1143 1142
1144 azx_free_stream_pages(chip); 1143 azx_free_stream_pages(chip);
1145 if (chip->region_requested) 1144 if (chip->region_requested)
diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c
index 4cf4be5ef82a..9ff600084973 100644
--- a/sound/pci/lola/lola.c
+++ b/sound/pci/lola/lola.c
@@ -551,10 +551,8 @@ static void lola_free(struct lola *chip)
551 lola_free_mixer(chip); 551 lola_free_mixer(chip);
552 if (chip->irq >= 0) 552 if (chip->irq >= 0)
553 free_irq(chip->irq, (void *)chip); 553 free_irq(chip->irq, (void *)chip);
554 if (chip->bar[0].remap_addr) 554 iounmap(chip->bar[0].remap_addr);
555 iounmap(chip->bar[0].remap_addr); 555 iounmap(chip->bar[1].remap_addr);
556 if (chip->bar[1].remap_addr)
557 iounmap(chip->bar[1].remap_addr);
558 if (chip->rb.area) 556 if (chip->rb.area)
559 snd_dma_free_pages(&chip->rb); 557 snd_dma_free_pages(&chip->rb);
560 pci_release_regions(chip->pci); 558 pci_release_regions(chip->pci);
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index 1faf47e81570..c3a9f39f8d61 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -1114,10 +1114,9 @@ static int snd_mixart_free(struct mixart_mgr *mgr)
1114 } 1114 }
1115 1115
1116 /* release the i/o ports */ 1116 /* release the i/o ports */
1117 for (i = 0; i < 2; i++) { 1117 for (i = 0; i < 2; ++i)
1118 if (mgr->mem[i].virt) 1118 iounmap(mgr->mem[i].virt);
1119 iounmap(mgr->mem[i].virt); 1119
1120 }
1121 pci_release_regions(mgr->pci); 1120 pci_release_regions(mgr->pci);
1122 1121
1123 /* free flowarray */ 1122 /* free flowarray */
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)
1460 if (chip->irq >= 0) 1460 if (chip->irq >= 0)
1461 free_irq(chip->irq, chip); 1461 free_irq(chip->irq, chip);
1462 1462
1463 if (chip->cport) 1463 iounmap(chip->cport);
1464 iounmap(chip->cport); 1464 iounmap(chip->buffer);
1465 if (chip->buffer)
1466 iounmap(chip->buffer);
1467 release_and_free_resource(chip->res_cport); 1465 release_and_free_resource(chip->res_cport);
1468 release_and_free_resource(chip->res_buffer); 1466 release_and_free_resource(chip->res_buffer);
1469 1467
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index cf5a6c8b9a63..fe66bcb21475 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -5309,9 +5309,7 @@ static int snd_hdsp_free(struct hdsp *hdsp)
5309 5309
5310 release_firmware(hdsp->firmware); 5310 release_firmware(hdsp->firmware);
5311 vfree(hdsp->fw_uploaded); 5311 vfree(hdsp->fw_uploaded);
5312 5312 iounmap(hdsp->iobase);
5313 if (hdsp->iobase)
5314 iounmap(hdsp->iobase);
5315 5313
5316 if (hdsp->port) 5314 if (hdsp->port)
5317 pci_release_regions(hdsp->pci); 5315 pci_release_regions(hdsp->pci);
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 3342705a5715..8109b8e5f6ef 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -6965,9 +6965,7 @@ static int snd_hdspm_free(struct hdspm * hdspm)
6965 free_irq(hdspm->irq, (void *) hdspm); 6965 free_irq(hdspm->irq, (void *) hdspm);
6966 6966
6967 kfree(hdspm->mixer); 6967 kfree(hdspm->mixer);
6968 6968 iounmap(hdspm->iobase);
6969 if (hdspm->iobase)
6970 iounmap(hdspm->iobase);
6971 6969
6972 if (hdspm->port) 6970 if (hdspm->port)
6973 pci_release_regions(hdspm->pci); 6971 pci_release_regions(hdspm->pci);
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c
index 6521521853b8..648911c1a226 100644
--- a/sound/pci/rme9652/rme9652.c
+++ b/sound/pci/rme9652/rme9652.c
@@ -1756,8 +1756,7 @@ static int snd_rme9652_free(struct snd_rme9652 *rme9652)
1756 1756
1757 if (rme9652->irq >= 0) 1757 if (rme9652->irq >= 0)
1758 free_irq(rme9652->irq, (void *)rme9652); 1758 free_irq(rme9652->irq, (void *)rme9652);
1759 if (rme9652->iobase) 1759 iounmap(rme9652->iobase);
1760 iounmap(rme9652->iobase);
1761 if (rme9652->port) 1760 if (rme9652->port)
1762 pci_release_regions(rme9652->pci); 1761 pci_release_regions(rme9652->pci);
1763 1762
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index 7f6a0a0d115a..5e9437ba6eec 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -1064,12 +1064,9 @@ static int sis_chip_free(struct sis7019 *sis)
1064 if (sis->irq >= 0) 1064 if (sis->irq >= 0)
1065 free_irq(sis->irq, sis); 1065 free_irq(sis->irq, sis);
1066 1066
1067 if (sis->ioaddr) 1067 iounmap(sis->ioaddr);
1068 iounmap(sis->ioaddr);
1069
1070 pci_release_regions(sis->pci); 1068 pci_release_regions(sis->pci);
1071 pci_disable_device(sis->pci); 1069 pci_disable_device(sis->pci);
1072
1073 sis_free_suspend(sis); 1070 sis_free_suspend(sis);
1074 return 0; 1071 return 0;
1075} 1072}
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index f5581a97d391..de7f06fb3f92 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -2246,8 +2246,7 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip)
2246 release_and_free_resource(chip->mpu_res); 2246 release_and_free_resource(chip->mpu_res);
2247 release_and_free_resource(chip->fm_res); 2247 release_and_free_resource(chip->fm_res);
2248 snd_ymfpci_free_gameport(chip); 2248 snd_ymfpci_free_gameport(chip);
2249 if (chip->reg_area_virt) 2249 iounmap(chip->reg_area_virt);
2250 iounmap(chip->reg_area_virt);
2251 if (chip->work_ptr.area) 2250 if (chip->work_ptr.area)
2252 snd_dma_free_pages(&chip->work_ptr); 2251 snd_dma_free_pages(&chip->work_ptr);
2253 2252
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 5a13b22748b2..d399df473896 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -867,16 +867,11 @@ static int snd_pmac_free(struct snd_pmac *chip)
867 snd_pmac_dbdma_free(chip, &chip->capture.cmd); 867 snd_pmac_dbdma_free(chip, &chip->capture.cmd);
868 snd_pmac_dbdma_free(chip, &chip->extra_dma); 868 snd_pmac_dbdma_free(chip, &chip->extra_dma);
869 snd_pmac_dbdma_free(chip, &emergency_dbdma); 869 snd_pmac_dbdma_free(chip, &emergency_dbdma);
870 if (chip->macio_base) 870 iounmap(chip->macio_base);
871 iounmap(chip->macio_base); 871 iounmap(chip->latch_base);
872 if (chip->latch_base) 872 iounmap(chip->awacs);
873 iounmap(chip->latch_base); 873 iounmap(chip->playback.dma);
874 if (chip->awacs) 874 iounmap(chip->capture.dma);
875 iounmap(chip->awacs);
876 if (chip->playback.dma)
877 iounmap(chip->playback.dma);
878 if (chip->capture.dma)
879 iounmap(chip->capture.dma);
880 875
881 if (chip->node) { 876 if (chip->node) {
882 int i; 877 int i;