From: Firo Yang Date: Sun, 26 Apr 2015 10:46:06 +0000 (+0800) Subject: ARM: meson: serial: convert iounmap to devm_iounmap X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c547630f6b5cfebf211b313d7c1f54794ac013f0;p=openwrt%2Fstaging%2Fblogic.git ARM: meson: serial: convert iounmap to devm_iounmap The function meson_uart_release_port() inappropriately try to iounmap() a resource managed by devm_ioremap_nocache(). The function meson_uart_release_port() maybe called by uart_ioctl() that means meson_uart_release_port() is not called from within a probe or remove function, for safety, I convert iounmap() to devm_iounmap(). Signed-off-by: Firo Yang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 67c036702629..0fc83c962d10 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -370,7 +370,7 @@ static int meson_uart_verify_port(struct uart_port *port, static void meson_uart_release_port(struct uart_port *port) { if (port->flags & UPF_IOREMAP) { - iounmap(port->membase); + devm_iounmap(port->dev, port->membase); port->membase = NULL; } }