From: Amol Lad Date: Sun, 1 Oct 2006 06:29:25 +0000 (-0700) Subject: [PATCH] ioremap balanced with iounmap for drivers/serial/mux.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=af907dc8cd4157d629e48533b3400786467340d5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [PATCH] ioremap balanced with iounmap for drivers/serial/mux.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/mux.c b/drivers/serial/mux.c index 4a1c9983f38f..aa819d3f8ee5 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c @@ -521,6 +521,8 @@ static void __exit mux_exit(void) for (i = 0; i < port_cnt; i++) { uart_remove_one_port(&mux_driver, &mux_ports[i]); + if (mux_ports[i].membase) + iounmap(mux_ports[i].membase); } uart_unregister_driver(&mux_driver);