提交 fb416f69 编写于 作者: W Wei Yongjun 提交者: Bjorn Andersson

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.
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
上级 178f3f75
...@@ -221,6 +221,7 @@ static struct glink_channel *qcom_glink_alloc_channel(struct qcom_glink *glink, ...@@ -221,6 +221,7 @@ static struct glink_channel *qcom_glink_alloc_channel(struct qcom_glink *glink,
/* Setup glink internal glink_channel data */ /* Setup glink internal glink_channel data */
spin_lock_init(&channel->recv_lock); spin_lock_init(&channel->recv_lock);
spin_lock_init(&channel->intent_lock); spin_lock_init(&channel->intent_lock);
mutex_init(&channel->intent_req_lock);
channel->glink = glink; channel->glink = glink;
channel->name = kstrdup(name, GFP_KERNEL); channel->name = kstrdup(name, GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册