Commit 0a7480bd authored by Dan Carpenter's avatar Dan Carpenter Committed by Bjorn Andersson

rpmsg: glink: Unlock on error in qcom_glink_request_intent()

If qcom_glink_tx() fails, then we need to unlock before returning the
error code.

Fixes: 27b9c5b6 ("rpmsg: glink: Request for intents when unavailable")
Acked-by: default avatarSricharan R <>
Signed-off-by: default avatarDan Carpenter <>
Signed-off-by: default avatarBjorn Andersson <>
parent 2bd6bf03
......@@ -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;
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment