summaryrefslogtreecommitdiff
path: root/drivers/soc/mediatek/mtk-cmdq-helper.c
diff options
context:
space:
mode:
authorDennis YC Hsieh <dennis-yc.hsieh@mediatek.com>2020-03-08 13:52:47 +0300
committerMatthias Brugger <matthias.bgg@gmail.com>2020-05-16 20:55:50 +0300
commit34c4e4072603ff5c174df73b973896abb76cbb51 (patch)
tree6d987b7b424ff4e7d305765c505bcd4dd8a05d4b /drivers/soc/mediatek/mtk-cmdq-helper.c
parent3b1f6c5e4dfaf767f6f2f120cd93b347b5a9f1aa (diff)
downloadlinux-34c4e4072603ff5c174df73b973896abb76cbb51.tar.xz
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: 576f1b4bc802 ("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>
Diffstat (limited to 'drivers/soc/mediatek/mtk-cmdq-helper.c')
-rw-r--r--drivers/soc/mediatek/mtk-cmdq-helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
index db37144ae98c..87ee9f767b7a 100644
--- a/drivers/soc/mediatek/mtk-cmdq-helper.c
+++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
@@ -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);