Commit cc3eb518 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jassi Brar

mailbox: mtk-cmdq: Fix uninitialized variable in cmdq_mbox_flush()

The "cb" pointer needs to be initialized before can assign
"data.data = cb->data;".
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarChun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent c0d580ce
......@@ -455,10 +455,10 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
list_for_each_entry_safe(task, tmp, &thread->task_busy_list,
list_entry) {
cb = &task->pkt->async_cb;
data.sta = -ECONNABORTED;
data.data = cb->data;
data.pkt = task->pkt;
cb = &task->pkt->async_cb;
if (cb->cb)
cb->cb(data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment