aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAmol Lad <amol@verismonetworks.com>2006-12-08 05:40:08 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:04 -0500
commitf190017b889c45364576396a3bfa32acbb16bf2b (patch)
tree1f24c91592b60f8c1f8b83db085fa91bc0f09356 /drivers/video
parent2b7574da255fef27cdb294e19bea26d911443511 (diff)
[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 <amol@verismonetworks.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.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/offb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index 9a40bbecf76b..9576a55eaf16 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,
402 fb_alloc_cmap(&info->cmap, 256, 0); 402 fb_alloc_cmap(&info->cmap, 256, 0);
403 403
404 if (register_framebuffer(info) < 0) { 404 if (register_framebuffer(info) < 0) {
405 iounmap(par->cmap_adr);
406 par->cmap_adr = NULL;
407 iounmap(info->screen_base);
405 kfree(info); 408 kfree(info);
406 release_mem_region(res_start, res_size); 409 release_mem_region(res_start, res_size);
407 return; 410 return;