diff options
author | Amol Lad <amol@verismonetworks.com> | 2006-12-08 05:40:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:05 -0500 |
commit | b2a85aebf9d6cb671085d58dfbbd7b11269d49eb (patch) | |
tree | 0ab6a1a5fad03cd811913a7e3095f5c3072bbfb8 /drivers/video | |
parent | d8b8c0a697d60c7d58a3dbda2d78553fd27727b3 (diff) |
[PATCH] ioremap balanced with iounmap for drivers/video/atyfb_base
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/aty/atyfb_base.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index e815b354c09d..b7b4e61b2951 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -3527,6 +3527,10 @@ static int __devinit atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *i | |||
3527 | atyfb_setup_generic_fail: | 3527 | atyfb_setup_generic_fail: |
3528 | iounmap(par->ati_regbase); | 3528 | iounmap(par->ati_regbase); |
3529 | par->ati_regbase = NULL; | 3529 | par->ati_regbase = NULL; |
3530 | if (info->screen_base) { | ||
3531 | iounmap(info->screen_base); | ||
3532 | info->screen_base = NULL; | ||
3533 | } | ||
3530 | return ret; | 3534 | return ret; |
3531 | } | 3535 | } |
3532 | 3536 | ||
@@ -3695,6 +3699,10 @@ static int __devinit atyfb_atari_probe(void) | |||
3695 | } | 3699 | } |
3696 | 3700 | ||
3697 | if (aty_init(info, "ISA bus")) { | 3701 | if (aty_init(info, "ISA bus")) { |
3702 | if (info->screen_base) | ||
3703 | iounmap(info->screen_base); | ||
3704 | if (par->ati_regbase) | ||
3705 | iounmap(par->ati_regbase); | ||
3698 | framebuffer_release(info); | 3706 | framebuffer_release(info); |
3699 | /* This is insufficient! kernel_map has added two large chunks!! */ | 3707 | /* This is insufficient! kernel_map has added two large chunks!! */ |
3700 | return -ENXIO; | 3708 | return -ENXIO; |