From: Amol Lad Date: Fri, 8 Dec 2006 10:40:06 +0000 (-0800) Subject: [PATCH] ioremap balanced with iounmap for drivers/video/retz3fb X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=027b53dd92e3d1a23c56d85e006a9bb5e63314f9;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] ioremap balanced with iounmap for drivers/video/retz3fb 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" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/retz3fb.c b/drivers/video/retz3fb.c index cf41ff177644..bc7ffc84e185 100644 --- a/drivers/video/retz3fb.c +++ b/drivers/video/retz3fb.c @@ -1423,8 +1423,10 @@ int __init retz3fb_init(void) do_install_cmap(0, fb_info); - if (register_framebuffer(fb_info) < 0) + if (register_framebuffer(fb_info) < 0) { + iounmap(zinfo->base); return -EINVAL; + } printk(KERN_INFO "fb%d: %s frame buffer device, using %ldK of " "video memory\n", fb_info->node,