public inbox for linux-remoteproc@vger.kernel.org
 help / color / mirror / Atom feed
From: Sricharan R <sricharan@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Ohad Ben-Cohen <ohad@wizery.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-remoteproc@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] rpmsg: glink: Unlock on error in qcom_glink_request_intent()
Date: Fri, 8 Sep 2017 16:43:06 +0530	[thread overview]
Message-ID: <1ee63e71-d736-254e-dddc-41497f5fcb74@codeaurora.org> (raw)
In-Reply-To: <20170908103345.brf5wcj5yg6zpslz@mwanda>

Hi,

On 9/8/2017 4:03 PM, Dan Carpenter wrote:
> If qcom_glink_tx() fails, then we need to unlock before returning the
> error code.
> 
> Fixes: 27b9c5b66b23 ("rpmsg: glink: Request for intents when unavailable")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
> index 5a5e927ea50f..fecb1dafa8f3 100644
> --- a/drivers/rpmsg/qcom_glink_native.c
> +++ b/drivers/rpmsg/qcom_glink_native.c
> @@ -1197,7 +1197,7 @@ static int qcom_glink_request_intent(struct qcom_glink *glink,
>  
>  	ret = qcom_glink_tx(glink, &cmd, sizeof(cmd), NULL, 0, true);
>  	if (ret)
> -		return ret;
> +		goto unlock;
>  
>  	ret = wait_for_completion_timeout(&channel->intent_req_comp, 10 * HZ);
>  	if (!ret) {
> @@ -1207,6 +1207,7 @@ static int qcom_glink_request_intent(struct qcom_glink *glink,
>  		ret = channel->intent_req_result ? 0 : -ECANCELED;
>  	}
>  
> +unlock:

Thanks for the catch.

Acked-by: Sricharan R <sricharan@codeaurora.org>

Regards,
 Sricharan

-- 
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

      parent reply	other threads:[~2017-09-08 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 10:33 [PATCH 1/2] rpmsg: glink: Unlock on error in qcom_glink_request_intent() Dan Carpenter
2017-09-08 10:34 ` [PATCH 2/2] rpmsg: glink: Fix memory leak in qcom_glink_alloc_intent() Dan Carpenter
2017-09-08 11:14   ` Sricharan R
2017-09-08 11:13 ` Sricharan R [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=1ee63e71-d736-254e-dddc-41497f5fcb74@codeaurora.org \
    --to=sricharan@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox