From f4664132613caf40bfbf17b7e0ab3340a8b8f526 Mon Sep 17 00:00:00 2001 From: Amol Lad Date: Sat, 30 Sep 2006 23:29:21 -0700 Subject: [PATCH] [PATCH] ioremap balanced with iounmap for drivers/serial/ioc4_serial.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 Cc: Brent Casavant Cc: Pat Gefre Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/serial/ioc4_serial.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index 576ca1eaa2..5ec4716c99 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c @@ -2685,6 +2685,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd) if (soft) { free_irq(control->ic_irq, soft); if (soft->is_ioc4_serial_addr) { + iounmap(soft->is_ioc4_serial_addr); release_region((unsigned long) soft->is_ioc4_serial_addr, sizeof(struct ioc4_serial)); @@ -2887,6 +2888,8 @@ out4: out3: kfree(control); out2: + if (serial) + iounmap(serial); release_region(tmp_addr1, sizeof(struct ioc4_serial)); out1: -- 2.39.5