提交 65da4d81 编写于 作者: A Amol Lad 提交者: Linus Torvalds

[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: NAmol Lad <amol@verismonetworks.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David S. Miller <davem@sunset.davemloft.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 af907dc8
...@@ -1499,6 +1499,9 @@ static int __devexit su_remove(struct of_device *dev) ...@@ -1499,6 +1499,9 @@ static int __devexit su_remove(struct of_device *dev)
uart_remove_one_port(&sunsu_reg, &up->port); 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); dev_set_drvdata(&dev->dev, NULL);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册