Skip to content

Commit

Permalink
ARM: meson: serial: convert iounmap to devm_iounmap
Browse files Browse the repository at this point in the history
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 <firogm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Firo Yang authored and Greg Kroah-Hartman committed May 6, 2015
1 parent eda0cd3 commit c547630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/meson_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit c547630

Please sign in to comment.