aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2015-01-12 16:35:08 +0000
committerJon Medhurst <tixy@linaro.org>2015-03-04 09:38:52 +0000
commit5d4bf7cd365fadd5f2d92f0e07bd2571a61eeead (patch)
tree2e8c1087a4b03761ea1ac7e05e47e186e6790845
parent85ef0131863fc59240c462441dffcfd07b43dc71 (diff)
mailbox: mhu: Initialise all members of struct mbox_client
Failure to do so means means we may end up using uninitialised values if new members are added, leading to bugs; as happens with commit 97b0c7bd2e86 (mailbox: add tx_prepare client callback). Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r--drivers/mailbox/scpi_protocol.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mailbox/scpi_protocol.c b/drivers/mailbox/scpi_protocol.c
index 16daf3c16d75..0388733c3c22 100644
--- a/drivers/mailbox/scpi_protocol.c
+++ b/drivers/mailbox/scpi_protocol.c
@@ -161,15 +161,12 @@ static void scpi_rx_callback(struct mbox_client *cl, void *msg)
static int send_scpi_cmd(struct scpi_data_buf *scpi_buf, bool high_priority)
{
struct mbox_chan *chan;
- struct mbox_client cl;
+ struct mbox_client cl = {0};
struct mhu_data_buf *data = scpi_buf->data;
u32 status;
cl.dev = the_scpi_device;
cl.rx_callback = scpi_rx_callback;
- cl.tx_done = NULL;
- cl.tx_block = false;
- cl.knows_txdone = false;
chan = mbox_request_channel(&cl, high_priority);
if (IS_ERR(chan))