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-Tag: v2.6.19-rc1~507 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=af907dc8cd4157d629e48533b3400786467340d5;p=linux-2.6-omap-h63xx.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 4a1c9983f38..aa819d3f8ee 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);