]> err.no Git - linux-2.6/commitdiff
[PATCH] ioremap balanced with iounmap for drivers/video/tgafb
authorAmol Lad <amol@verismonetworks.com>
Fri, 8 Dec 2006 10:40:04 +0000 (02:40 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 8 Dec 2006 16:29:04 +0000 (08:29 -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>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/tgafb.c

index 08b3153bfb3fe0fd6df4707d3e1ae11cf15fc18d..4b88fab83b74bdbc008e8c3e86910e5549c79dac 100644 (file)
@@ -1439,6 +1439,8 @@ tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
        return 0;
 
  err1:
+       if (mem_base)
+               iounmap(mem_base);
        release_mem_region(bar0_start, bar0_len);
  err0:
        kfree(all);