From: Amol Lad Date: Fri, 8 Dec 2006 10:40:08 +0000 (-0800) Subject: [PATCH] ioremap balanced with iounmap for drivers/video/offb X-Git-Tag: v2.6.20-rc1~34^2~107 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f190017b889c45364576396a3bfa32acbb16bf2b;p=linux-2.6-omap-h63xx.git [PATCH] ioremap balanced with iounmap for drivers/video/offb 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" Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/offb.c b/drivers/video/offb.c index 9a40bbecf76..9576a55eaf1 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c @@ -402,6 +402,9 @@ static void __init offb_init_fb(const char *name, const char *full_name, fb_alloc_cmap(&info->cmap, 256, 0); if (register_framebuffer(info) < 0) { + iounmap(par->cmap_adr); + par->cmap_adr = NULL; + iounmap(info->screen_base); kfree(info); release_mem_region(res_start, res_size); return;