public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rpmsg: smd: Fix double unlock in __qcom_smd_send()
@ 2018-01-19 13:22 Dan Carpenter
  2018-01-19 15:08 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-01-19 13:22 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson; +Cc: linux-remoteproc, kernel-janitors

We're not holding the lock here, so we shouldn't unlock.

Fixes: 178f3f75bb4e ("rpmsg: smd: Don't hold the tx lock during wait")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index cea9a0930c4d..dd3e7eea8c38 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -759,11 +759,11 @@ static int __qcom_smd_send(struct qcom_smd_channel *channel, const void *data,
 				       qcom_smd_get_tx_avail(channel) >= tlen ||
 				       channel->state != SMD_CHANNEL_OPENED);
 		if (ret)
-			goto out;
+			goto ret;
 
 		ret = mutex_lock_interruptible(&channel->tx_lock);
 		if (ret)
-			goto out;
+			return ret;
 
 		SET_TX_CHANNEL_FLAG(channel, fBLOCKREADINTR, 1);
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-19 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-19 13:22 [PATCH] rpmsg: smd: Fix double unlock in __qcom_smd_send() Dan Carpenter
2018-01-19 15:08 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox