From: Amol Lad Date: Fri, 8 Dec 2006 10:40:06 +0000 (-0800) Subject: [PATCH] ioremap balanced with iounmap for drivers/video/retz3fb X-Git-Tag: v2.6.20-rc1~34^2~110 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=027b53dd92e3d1a23c56d85e006a9bb5e63314f9;p=linux-2.6-omap-h63xx.git [PATCH] ioremap balanced with iounmap for drivers/video/retz3fb 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/retz3fb.c b/drivers/video/retz3fb.c index cf41ff17764..bc7ffc84e18 100644 --- a/drivers/video/retz3fb.c +++ b/drivers/video/retz3fb.c @@ -1423,8 +1423,10 @@ int __init retz3fb_init(void) do_install_cmap(0, fb_info); - if (register_framebuffer(fb_info) < 0) + if (register_framebuffer(fb_info) < 0) { + iounmap(zinfo->base); return -EINVAL; + } printk(KERN_INFO "fb%d: %s frame buffer device, using %ldK of " "video memory\n", fb_info->node,