aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAmol Lad <amol@verismonetworks.com>2006-12-08 05:40:05 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:04 -0500
commit9cf2014aad58076aa22faacf27742d9610dea05d (patch)
tree084a3ba88e3da3045b7a2a51787abce66ad57c70 /drivers/video
parente4bf051b4f3121c5abdde836b1429e4a4459adb4 (diff)
[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 <amol@verismonetworks.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Helge Deller <deller@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/stifb.c3
1 files changed, 3 insertions, 0 deletions
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:
1291out_err2: 1291out_err2:
1292 release_mem_region(fix->smem_start, fix->smem_len); 1292 release_mem_region(fix->smem_start, fix->smem_len);
1293out_err1: 1293out_err1:
1294 iounmap(info->screen_base);
1294 fb_dealloc_cmap(&info->cmap); 1295 fb_dealloc_cmap(&info->cmap);
1295out_err0: 1296out_err0:
1296 kfree(fb); 1297 kfree(fb);
@@ -1364,6 +1365,8 @@ stifb_cleanup(void)
1364 unregister_framebuffer(sti->info); 1365 unregister_framebuffer(sti->info);
1365 release_mem_region(info->fix.mmio_start, info->fix.mmio_len); 1366 release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
1366 release_mem_region(info->fix.smem_start, info->fix.smem_len); 1367 release_mem_region(info->fix.smem_start, info->fix.smem_len);
1368 if (info->screen_base)
1369 iounmap(info->screen_base);
1367 fb_dealloc_cmap(&info->cmap); 1370 fb_dealloc_cmap(&info->cmap);
1368 kfree(info); 1371 kfree(info);
1369 } 1372 }