mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
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 <firogm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
eda0cd3546
commit
c547630f6b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue