1
0
Fork 0

mailbox: handle empty message in tx_tick

commit cb710ab1d8 upstream.

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>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
steinar/wifi_calib_4_9_kernel
Sudeep Holla 2017-03-21 11:30:16 +00:00 committed by Greg Kroah-Hartman
parent abe9090ac0
commit 016a638a51
1 changed files with 4 additions and 1 deletions

View File

@ -104,8 +104,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)