浏览代码

slimbus: messaging: initialize completion correctly

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srinivas Kandagatla 7 年之前
父节点
当前提交
ffa2d92191
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/slimbus/messaging.c

+ 1 - 0
drivers/slimbus/messaging.c

@@ -246,6 +246,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;
 }
 
 /**