mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
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: 2b6d83e2b8
("mailbox: Introduce framework for mailbox")
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
parent
cc6eeaa302
commit
cb710ab1d8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user