From 9cf2014aad58076aa22faacf27742d9610dea05d Mon Sep 17 00:00:00 2001 From: Amol Lad Date: Fri, 8 Dec 2006 02:40:05 -0800 Subject: [PATCH] ioremap balanced with iounmap for drivers/video/stifb 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: Helge Deller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/stifb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c index 3e16e2d9d55d..69f3b264a22e 100644 --- a/drivers/video/stifb.c +++ b/drivers/video/stifb.c @@ -1291,6 +1291,7 @@ out_err3: out_err2: release_mem_region(fix->smem_start, fix->smem_len); out_err1: + iounmap(info->screen_base); fb_dealloc_cmap(&info->cmap); out_err0: kfree(fb); @@ -1364,6 +1365,8 @@ stifb_cleanup(void) unregister_framebuffer(sti->info); release_mem_region(info->fix.mmio_start, info->fix.mmio_len); release_mem_region(info->fix.smem_start, info->fix.smem_len); + if (info->screen_base) + iounmap(info->screen_base); fb_dealloc_cmap(&info->cmap); kfree(info); } -- cgit v1.2.2