Skip to content

Commit

Permalink
soc: mediatek: cmdq: return send msg error code
Browse files Browse the repository at this point in the history
Return error code to client if send message fail,
so that client has chance to error handling.

Fixes: 576f1b4 ("soc: mediatek: Add Mediatek CMDQ helper")
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://lore.kernel.org/r/1583664775-19382-6-git-send-email-dennis-yc.hsieh@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
  • Loading branch information
Dennis YC Hsieh authored and Matthias Brugger committed May 16, 2020
1 parent 3b1f6c5 commit 34c4e40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/soc/mediatek/mtk-cmdq-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
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. */
mbox_client_txdone(client->chan, 0);

Expand Down

0 comments on commit 34c4e40

Please sign in to comment.