aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAmol Lad <amol@verismonetworks.com>2006-12-08 05:40:16 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:05 -0500
commit57354c42f177a2b58fb1f61125ad2cb2e8743a9b (patch)
tree361b292af4526bd2ef741c484e0f58b4da45142c /drivers/video
parent6792951b6ad13d7b2fff71ae7d2982b2fa1d6788 (diff)
[PATCH] ioremap balanced with iounmap for drivers/video/amifb
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> 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/amifb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
index a4e3fca05891..88a47845c4f7 100644
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -2407,10 +2407,10 @@ default_chipset:
2407 fb_info.fix.smem_len); 2407 fb_info.fix.smem_len);
2408 if (!videomemory) { 2408 if (!videomemory) {
2409 printk("amifb: WARNING! unable to map videomem cached writethrough\n"); 2409 printk("amifb: WARNING! unable to map videomem cached writethrough\n");
2410 videomemory = ZTWO_VADDR(fb_info.fix.smem_start); 2410 fb_info.screen_base = (char *)ZTWO_VADDR(fb_info.fix.smem_start);
2411 } 2411 } else
2412 fb_info.screen_base = (char *)videomemory;
2412 2413
2413 fb_info.screen_base = (char *)videomemory;
2414 memset(dummysprite, 0, DUMMYSPRITEMEMSIZE); 2414 memset(dummysprite, 0, DUMMYSPRITEMEMSIZE);
2415 2415
2416 /* 2416 /*
@@ -2453,6 +2453,8 @@ static void amifb_deinit(void)
2453{ 2453{
2454 fb_dealloc_cmap(&fb_info.cmap); 2454 fb_dealloc_cmap(&fb_info.cmap);
2455 chipfree(); 2455 chipfree();
2456 if (videomemory)
2457 iounmap((void*)videomemory);
2456 release_mem_region(CUSTOM_PHYSADDR+0xe0, 0x120); 2458 release_mem_region(CUSTOM_PHYSADDR+0xe0, 0x120);
2457 custom.dmacon = DMAF_ALL | DMAF_MASTER; 2459 custom.dmacon = DMAF_ALL | DMAF_MASTER;
2458} 2460}