All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: davidb@codeaurora.org, dwalker@fifo99.com, bryanh@codeaurora.org,
	gregkh@linuxfoundation.org, jslaby@suse.cz,
	grant.likely@linaro.org, rob.herring@calxeda.com,
	yongjun_wei@trendmicro.com.cn, linux-arm-msm@vger.kernel.org,
	linux-serial@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH] msm_serial: add missing iounmap() on error in msm_request_port()
Date: Wed, 17 Jul 2013 14:28:42 +0300	[thread overview]
Message-ID: <1374060522.2657.30.camel@iivanov-dev> (raw)
In-Reply-To: <CAPgLHd_LGRtkqcPbm=snHOsFOzX6vfafw3EnZtcJmDGCHKHq=Q@mail.gmail.com>

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

Reviewed-by: Ivan T. Ivanov <iivanov@mm-sol.com>

Regards,
Ivan


> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2013-07-17 11:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17  5:34 [PATCH] msm_serial: add missing iounmap() on error in msm_request_port() Wei Yongjun
2013-07-17 11:28 ` Ivan T. Ivanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374060522.2657.30.camel@iivanov-dev \
    --to=iivanov@mm-sol.com \
    --cc=bryanh@codeaurora.org \
    --cc=davidb@codeaurora.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dwalker@fifo99.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.