1
0
Fork 0

HSM-267-1: fw: imx: seco_mu: Handle error code in mailbox rx callback

It is possible the mailbox framework returns an error code
if there was an issue when receiving a message.

This patch adds the handling of such exception.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Franck LENORMAND 2020-03-26 11:19:03 +01:00
parent c1a6c87e78
commit 5258913894
1 changed files with 7 additions and 1 deletions

View File

@ -856,7 +856,13 @@ static void seco_mu_rx_callback(struct mbox_client *c, void *msg)
/* The function can be called with NULL msg */
if (!msg) {
dev_warn(dev, "Message is invalid\n");
dev_err(dev, "Message is invalid\n");
return;
}
if (IS_ERR(msg)) {
dev_err(dev, "Error during reception of message: %ld\n",
PTR_ERR(msg));
return;
}