提交 cb710ab1 编写于 作者: S Sudeep Holla 提交者: Jassi Brar

mailbox: handle empty message in tx_tick

We already check if the message is empty before calling the client
tx_done callback. Calling completion on a wait event is also invalid
if the message is empty.

This patch moves the existing empty message check earlier.

Fixes: 2b6d83e2 ("mailbox: Introduce framework for mailbox")
Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 cc6eeaa3
......@@ -103,8 +103,11 @@ static void tx_tick(struct mbox_chan *chan, int r)
/* Submit next message */
msg_submit(chan);
if (!mssg)
return;
/* Notify the client */
if (mssg && chan->cl->tx_done)
if (chan->cl->tx_done)
chan->cl->tx_done(chan->cl, mssg, r);
if (r != -ETIME && chan->cl->tx_block)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册