From: Amol Lad Date: Fri, 8 Dec 2006 10:40:10 +0000 (-0800) Subject: [PATCH] ioremap balanced with iounmap for drivers/video/hpfb X-Git-Tag: v2.6.20-rc1~34^2~105 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1bedb0b2f60dd858fd12e5dd5681fa5da55175f5;p=linux-2.6-omap-h63xx.git [PATCH] ioremap balanced with iounmap for drivers/video/hpfb 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: Bjorn Helgaas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c index 91cf3b577d1..9ab9b839a0f 100644 --- a/drivers/video/hpfb.c +++ b/drivers/video/hpfb.c @@ -295,6 +295,8 @@ static int __init hpfb_init_one(unsigned long phys_base, unsigned long virt_base if (register_framebuffer(&fb_info) < 0) { fb_dealloc_cmap(&fb_info.cmap); + iounmap(fb_info.screen_base); + fb_info.screen_base = NULL; return 1; }