public inbox for linux-remoteproc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] rpmsg: glink: Fix missing mutex_init() in qcom_glink_alloc_channel()
@ 2018-01-02 11:47 Wei Yongjun
  2018-01-02 17:23 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2018-01-02 11:47 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson; +Cc: Wei Yongjun, linux-remoteproc

qcom_glink_alloc_channel() allocates the mutex but not initialize it.
Use mutex_init() on it to initialize it correctly.

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/rpmsg/qcom_glink_native.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 40d76d2..e0f31ed 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -221,6 +221,7 @@ static struct glink_channel *qcom_glink_alloc_channel(struct qcom_glink *glink,
 	/* Setup glink internal glink_channel data */
 	spin_lock_init(&channel->recv_lock);
 	spin_lock_init(&channel->intent_lock);
+	mutex_init(&channel->intent_req_lock);
 
 	channel->glink = glink;
 	channel->name = kstrdup(name, GFP_KERNEL);


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

end of thread, other threads:[~2018-01-02 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-02 11:47 [PATCH -next] rpmsg: glink: Fix missing mutex_init() in qcom_glink_alloc_channel() Wei Yongjun
2018-01-02 17:23 ` Bjorn Andersson

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