diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-01-02 06:47:03 -0500 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-01-02 12:23:20 -0500 |
commit | fb416f69900773d5a6030c909114099f92d07ab9 (patch) | |
tree | bab93012b9e951c11e82cb999945d8c04066cfb3 /drivers/rpmsg | |
parent | 178f3f75bb4ef7a29bf5c175eb33794ac9ae9bce (diff) |
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: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/qcom_glink_native.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 40d76d2a5eff..e0f31ed096a5 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, | |||
221 | /* Setup glink internal glink_channel data */ | 221 | /* Setup glink internal glink_channel data */ |
222 | spin_lock_init(&channel->recv_lock); | 222 | spin_lock_init(&channel->recv_lock); |
223 | spin_lock_init(&channel->intent_lock); | 223 | spin_lock_init(&channel->intent_lock); |
224 | mutex_init(&channel->intent_req_lock); | ||
224 | 225 | ||
225 | channel->glink = glink; | 226 | channel->glink = glink; |
226 | channel->name = kstrdup(name, GFP_KERNEL); | 227 | channel->name = kstrdup(name, GFP_KERNEL); |