]> err.no Git - linux-2.6/commitdiff
[PATCH] sound/oss/btaudio.c: ioremap balanced with iounmap
authorAmol Lad <amol@verismonetworks.com>
Thu, 7 Dec 2006 04:35:23 +0000 (20:35 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Thu, 7 Dec 2006 16:39:30 +0000 (08:39 -0800)
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/oss/btaudio.c

index 6ad38411423989b7d3232e92c7cd43f820574634..ad7210a00dc01ead45e119d7fed3f2c613124ed6 100644 (file)
@@ -1020,6 +1020,7 @@ static int __devinit btaudio_probe(struct pci_dev *pci_dev,
  fail2:
         free_irq(bta->irq,bta);        
  fail1:
+       iounmap(bta->mmio);
        kfree(bta);
  fail0:
        release_mem_region(pci_resource_start(pci_dev,0),
@@ -1051,6 +1052,7 @@ static void __devexit btaudio_remove(struct pci_dev *pci_dev)
         free_irq(bta->irq,bta);
        release_mem_region(pci_resource_start(pci_dev,0),
                           pci_resource_len(pci_dev,0));
+       iounmap(bta->mmio);
 
        /* remove from linked list */
        if (bta == btaudios) {