diff options
author | Amol Lad <amol@verismonetworks.com> | 2006-12-08 05:40:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:04 -0500 |
commit | 1bedb0b2f60dd858fd12e5dd5681fa5da55175f5 (patch) | |
tree | 125d165ff9d202593639a6d1707ae98298bdff76 | |
parent | 164a765b9895f4f80f91cb7f1aab7539b3f8d335 (diff) |
[PATCH] ioremap balanced with iounmap for drivers/video/hpfb
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>
-rw-r--r-- | drivers/video/hpfb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c index 91cf3b577d15..9ab9b839a0f5 100644 --- a/drivers/video/hpfb.c +++ b/drivers/video/hpfb.c | |||
@@ -295,6 +295,8 @@ static int __init hpfb_init_one(unsigned long phys_base, unsigned long virt_base | |||
295 | 295 | ||
296 | if (register_framebuffer(&fb_info) < 0) { | 296 | if (register_framebuffer(&fb_info) < 0) { |
297 | fb_dealloc_cmap(&fb_info.cmap); | 297 | fb_dealloc_cmap(&fb_info.cmap); |
298 | iounmap(fb_info.screen_base); | ||
299 | fb_info.screen_base = NULL; | ||
298 | return 1; | 300 | return 1; |
299 | } | 301 | } |
300 | 302 | ||