From: Amol Lad Date: Fri, 8 Dec 2006 10:40:12 +0000 (-0800) Subject: [PATCH] ioremap balanced with iounmap for drivers/video/cyberfb X-Git-Tag: v2.6.20-rc1~34^2~102 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d02abed8aa6bd37abcd802de64a63ed2af5e18ff;p=linux-2.6 [PATCH] ioremap balanced with iounmap for drivers/video/cyberfb ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/cyberfb.c b/drivers/video/cyberfb.c index c40e72dafb..bc1cc44b1e 100644 --- a/drivers/video/cyberfb.c +++ b/drivers/video/cyberfb.c @@ -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;