Commit 34c4e407 authored by Dennis YC Hsieh's avatar Dennis YC Hsieh Committed by Matthias Brugger

soc: mediatek: cmdq: return send msg error code

Return error code to client if send message fail,
so that client has chance to error handling.

Fixes: 576f1b4b ("soc: mediatek: Add Mediatek CMDQ helper")
Signed-off-by: default avatarDennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
Reviewed-by: default avatarCK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/1583664775-19382-6-git-send-email-dennis-yc.hsieh@mediatek.comSigned-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
parent 3b1f6c5e
...@@ -351,7 +351,9 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb, ...@@ -351,7 +351,9 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
spin_unlock_irqrestore(&client->lock, flags); spin_unlock_irqrestore(&client->lock, flags);
} }
mbox_send_message(client->chan, pkt); err = mbox_send_message(client->chan, pkt);
if (err < 0)
return err;
/* We can send next packet immediately, so just call txdone. */ /* We can send next packet immediately, so just call txdone. */
mbox_client_txdone(client->chan, 0); mbox_client_txdone(client->chan, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment