]> err.no Git - linux-2.6/commitdiff
[PATCH] ioremap balanced with iounmap for drivers/video/cyberfb
authorAmol Lad <amol@verismonetworks.com>
Fri, 8 Dec 2006 10:40:12 +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/cyberfb.c

index c40e72dafb0e99e8ae8edd877bca9a49e86c66ef..bc1cc44b1e3fc95ff7bfd729d216299cd8b79e90 100644 (file)
@@ -1055,6 +1055,8 @@ int __init cyberfb_init(void)
 
            if (register_framebuffer(&fb_info) < 0) {
                    DPRINTK("EXIT - register_framebuffer failed\n");
+                       if (CyberBase)
+                               iounmap(CyberBase);
                    release_mem_region(CyberMem_phys, 0x400000);
                    release_mem_region(CyberRegs_phys, 0x10000);
                    return -EINVAL;