rpmsg: glink: Fix missing mutex_init() in qcom_glink_alloc_channel()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/rpmsg/qcom_glink_native.c | 1 + 1 file changed, 1 insertion(+)
drivers/rpmsg/qcom_glink_native.c +1 -0
@@ -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 );
Quoted 6 lines · Wei Yongjun
qcom_glink_alloc_channel()allocates the mutex but not initialize it. Usemutex_init()on it to initialize it correctly.This is detected by Coccinelle semantic patch.
Signed-off-by Wei Yongjun <[email protected]>
Thanks Wei, applied.
Regards,
Bjorn
Quoted 21 lines
--- drivers/rpmsg/qcom_glink_native.c | 1 + 1 file changed, 1 insertion(+)drivers/rpmsg/qcom_glink_native.c +1
-1@@ -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 ); --To unsubscribe from this list: send the line "unsubscribe linux-remoteproc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html