From: Amol Lad Date: Thu, 7 Dec 2006 04:35:23 +0000 (-0800) Subject: [PATCH] sound/oss/btaudio.c: ioremap balanced with iounmap X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b9d85b08c689dbf54b9943a02f73cb54c2b0fccf;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c index 6ad384114239..ad7210a00dc0 100644 --- a/sound/oss/btaudio.c +++ b/sound/oss/btaudio.c @@ -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) {