From: Amol Lad ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: "Antonino A. Daplas" Cc: David S. Miller Signed-off-by: Andrew Morton --- drivers/video/ffb.c | 4 ++++ 1 files changed, 4 insertions(+) diff -puN drivers/video/ffb.c~ioremap-balanced-with-iounmap-for-drivers-video-ffb drivers/video/ffb.c --- a/drivers/video/ffb.c~ioremap-balanced-with-iounmap-for-drivers-video-ffb +++ a/drivers/video/ffb.c @@ -968,6 +968,8 @@ static int ffb_init_one(struct of_device if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { printk(KERN_ERR "ffb: Could not allocate color map.\n"); + of_iounmap(all->par.fbc, sizeof(struct ffb_fbc)); + of_iounmap(all->par.dac, sizeof(struct ffb_dac)); kfree(all); return -ENOMEM; } @@ -978,6 +980,8 @@ static int ffb_init_one(struct of_device if (err < 0) { printk(KERN_ERR "ffb: Could not register framebuffer.\n"); fb_dealloc_cmap(&all->info.cmap); + of_iounmap(all->par.fbc, sizeof(struct ffb_fbc)); + of_iounmap(all->par.dac, sizeof(struct ffb_dac)); kfree(all); return err; } _