diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-07-17 05:34:09 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-26 23:04:50 (GMT) |
commit | 195be84aaae50af84c833d91c81af015091ec86d (patch) | |
tree | 1159d446e5326aa73f5d9fe8de3fad3cbfe720e2 /drivers/tty/serial/msm_serial.c | |
parent | 37e1ceb1796279d8a7b0dfaeff8a829d1dd1b2f3 (diff) | |
download | linux-fsl-qoriq-195be84aaae50af84c833d91c81af015091ec86d.tar.xz |
msm_serial: add missing iounmap() on error in msm_request_port()
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>
Diffstat (limited to 'drivers/tty/serial/msm_serial.c')
-rw-r--r-- | drivers/tty/serial/msm_serial.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index 2c6cfb3..0b38b28 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -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); @@ -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; |