Re: [PATCH] msm_serial: add missing iounmap() on error in msm_request_port()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2013-07-17 at 13:34 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> 
> Add the missing iounmap() before return from msm_request_port()
> in the error handling case.
> 

Reviewed-by: Ivan T. Ivanov <iivanov@xxxxxxxxxx>

Regards,
Ivan


> Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> ---
>  drivers/tty/serial/msm_serial.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 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;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-serial" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux