linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] firmware: arm_scmi: optee: Fix missing mutex_init()
@ 2021-11-23  8:36 Wei Yongjun
  2021-11-23 13:17 ` Etienne Carriere
  2021-11-25 12:36 ` Sudeep Holla
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2021-11-23  8:36 UTC (permalink / raw)
  To: weiyongjun1, Etienne Carriere, Sudeep Holla
  Cc: linux-arm-kernel, linux-kernel, kernel-janitors, Hulk Robot

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

Fixes: 5f90f189a052 ("firmware: arm_scmi: Add optee transport")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/firmware/arm_scmi/optee.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/arm_scmi/optee.c b/drivers/firmware/arm_scmi/optee.c
index d9819b0197ec..901737c9f5f8 100644
--- a/drivers/firmware/arm_scmi/optee.c
+++ b/drivers/firmware/arm_scmi/optee.c
@@ -506,6 +506,7 @@ static int scmi_optee_service_probe(struct device *dev)
 	agent->dev = dev;
 	agent->tee_ctx = tee_ctx;
 	INIT_LIST_HEAD(&agent->channel_list);
+	mutex_init(&agent->mu);
 
 	ret = get_capabilities(agent);
 	if (ret)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-11-25 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-23  8:36 [PATCH -next] firmware: arm_scmi: optee: Fix missing mutex_init() Wei Yongjun
2021-11-23 13:17 ` Etienne Carriere
2021-11-25 12:36 ` Sudeep Holla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).