diff mbox series

[v2,7/8] slimbus: messaging: initialize completion correctly

Message ID 20180517085850.14276-8-srinivas.kandagatla@linaro.org
State Superseded
Headers show
Series slimbus: fixes and some helpers | expand

Commit Message

Srinivas Kandagatla May 17, 2018, 8:58 a.m. UTC
slim_val_inf can contain random value from stack, make sure the completion
is initialized to NULL while filling the msg.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

---
 drivers/slimbus/messaging.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.16.2
diff mbox series

Patch

diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c
index fd0788019357..2635eaaadf4a 100644
--- a/drivers/slimbus/messaging.c
+++ b/drivers/slimbus/messaging.c
@@ -277,6 +277,7 @@  static void slim_fill_msg(struct slim_val_inf *msg, u32 addr,
 	msg->num_bytes = count;
 	msg->rbuf = rbuf;
 	msg->wbuf = wbuf;
+	msg->comp = NULL;
 }
 
 /**