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
parent
c1a6c87e78
commit
5258913894
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue