slimbus: messaging: initialize completion correctly
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 19 Jun 2018 15:12:04 +0000 (16:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jul 2018 15:23:12 +0000 (17:23 +0200)
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>
drivers/slimbus/messaging.c

index 1c57b63..e3605ed 100644 (file)
@@ -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;
 }
 
 /**