Skip to content

Commit

Permalink
[PATCH] ioremap balanced with iounmap for drivers/video/hpfb
Browse files Browse the repository at this point in the history
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: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Amol Lad authored and Linus Torvalds committed Dec 8, 2006
1 parent 164a765 commit 1bedb0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/video/hpfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1bedb0b

Please sign in to comment.