Skip to content

Commit b9d85b0

Browse files
Amol LadLinus Torvalds
authored andcommitted
[PATCH] sound/oss/btaudio.c: ioremap balanced with iounmap
ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent aa8a8d6 commit b9d85b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/oss/btaudio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ static int __devinit btaudio_probe(struct pci_dev *pci_dev,
10201020
fail2:
10211021
free_irq(bta->irq,bta);
10221022
fail1:
1023+
iounmap(bta->mmio);
10231024
kfree(bta);
10241025
fail0:
10251026
release_mem_region(pci_resource_start(pci_dev,0),
@@ -1051,6 +1052,7 @@ static void __devexit btaudio_remove(struct pci_dev *pci_dev)
10511052
free_irq(bta->irq,bta);
10521053
release_mem_region(pci_resource_start(pci_dev,0),
10531054
pci_resource_len(pci_dev,0));
1055+
iounmap(bta->mmio);
10541056

10551057
/* remove from linked list */
10561058
if (bta == btaudios) {

0 commit comments

Comments
 (0)