summaryrefslogtreecommitdiff
path: root/drivers/serial/sunsu.c
diff options
context:
space:
mode:
authorAmol Lad <amol@verismonetworks.com>2006-10-01 10:29:25 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 11:39:32 +0400
commit65da4d81f48e092f71feaf04bf2ccd096b5a5171 (patch)
treea6822f8aac500b3ab8dae04a2abc615ec4e187ea /drivers/serial/sunsu.c
parentaf907dc8cd4157d629e48533b3400786467340d5 (diff)
downloadlinux-65da4d81f48e092f71feaf04bf2ccd096b5a5171.tar.xz
[PATCH] ioremap balanced with iounmap for drivers/serial/sunsu.c
ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad <amol@verismonetworks.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: David S. Miller <davem@sunset.davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/serial/sunsu.c')
-rw-r--r--drivers/serial/sunsu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index d3a5aeee73a3..9b3b9aaa6b90 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1499,6 +1499,9 @@ static int __devexit su_remove(struct of_device *dev)
uart_remove_one_port(&sunsu_reg, &up->port);
}
+ if (up->port.membase)
+ of_iounmap(up->port.membase, up->reg_size);
+
dev_set_drvdata(&dev->dev, NULL);
return 0;