From: Wei Yongjun Date: Wed, 17 Jul 2013 05:34:09 +0000 (+0800) Subject: msm_serial: add missing iounmap() on error in msm_request_port() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=195be84aaae50af84c833d91c81af015091ec86d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Ivan T. Ivanov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index 2c6cfb3cf032..0b38b288ed5b 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;