diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-06-22 16:08:52 +0300 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2021-06-26 11:41:47 -0500 |
commit | cc3eb51814d0f31671d57e85d4912403a11506e9 (patch) | |
tree | 8c4d540b77aa937f0b9b11b545dc68b5f84787e8 /drivers/mailbox | |
parent | c0d580cefa46f28873202b7e3df9313a570633bd (diff) |
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>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r-- | drivers/mailbox/mtk-cmdq-mailbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index 301e65b9527a..67a42b514429 100644 --- a/drivers/mailbox/mtk-cmdq-mailbox.c +++ b/drivers/mailbox/mtk-cmdq-mailbox.c @@ -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); |