mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
[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>
This commit is contained in:
parent
af907dc8cd
commit
65da4d81f4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user