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: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
Dan Carpenter 2021-06-22 16:08:52 +03:00 committed by Jassi Brar
parent c0d580cefa
commit cc3eb51814

View File

@ -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);