Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c875fe7 authored by Wei Yongjun's avatar Wei Yongjun Committed by Chris Lew
Browse files

rpmsg: glink: Fix missing mutex_init() in qcom_glink_alloc_channel()



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.

Change-Id: If32134bfff9770a06edaec8137ecfa2fe546e4ba
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Patch-mainline: linux-remoteproc @ 01/02/2018 11:47
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent bbe57a6c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -231,6 +231,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);