Skip to content

Commit 34c4e40

Browse files
Dennis YC Hsiehmbgg
authored andcommitted
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: 576f1b4 ("soc: mediatek: Add Mediatek CMDQ helper") Signed-off-by: Dennis YC Hsieh <[email protected]> Reviewed-by: CK Hu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
1 parent 3b1f6c5 commit 34c4e40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/soc/mediatek/mtk-cmdq-helper.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,9 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
351351
spin_unlock_irqrestore(&client->lock, flags);
352352
}
353353

354-
mbox_send_message(client->chan, pkt);
354+
err = mbox_send_message(client->chan, pkt);
355+
if (err < 0)
356+
return err;
355357
/* We can send next packet immediately, so just call txdone. */
356358
mbox_client_txdone(client->chan, 0);
357359

0 commit comments

Comments
 (0)