From: Amol Lad Date: Sun, 1 Oct 2006 06:29:21 +0000 (-0700) Subject: [PATCH] ioremap balanced with iounmap for drivers/serial/8250_gsc.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d9964d5c9067fe58fecb7ba10b2de4771d2005d9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] ioremap balanced with iounmap for drivers/serial/8250_gsc.c ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/serial/8250_gsc.c b/drivers/serial/8250_gsc.c index 913c71cc0569..1ebe6b585d2d 100644 --- a/drivers/serial/8250_gsc.c +++ b/drivers/serial/8250_gsc.c @@ -64,6 +64,7 @@ serial_init_chip(struct parisc_device *dev) err = serial8250_register_port(&port); if (err < 0) { printk(KERN_WARNING "serial8250_register_port returned error %d\n", err); + iounmap(port.membase); return err; }