Skip to content

Commit

Permalink
msm_serial: add missing iounmap() on error in msm_request_port()
Browse files Browse the repository at this point in the history
Add the missing iounmap() before return from msm_request_port()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Jul 26, 2013
1 parent 37e1ceb commit 195be84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/tty/serial/msm_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ static int msm_request_port(struct uart_port *port)
if (!request_mem_region(gsbi_resource->start, size,
"msm_serial")) {
ret = -EBUSY;
goto fail_release_port;
goto fail_release_port_membase;
}

msm_port->gsbi_base = ioremap(gsbi_resource->start, size);
Expand All @@ -651,6 +651,8 @@ static int msm_request_port(struct uart_port *port)

fail_release_gsbi:
release_mem_region(gsbi_resource->start, size);
fail_release_port_membase:
iounmap(port->membase);
fail_release_port:
release_mem_region(port->mapbase, size);
return ret;
Expand Down

0 comments on commit 195be84

Please sign in to comment.