]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mailbox: imx: Forward the timeout/ error in imx_mu_generic_tx()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 17 Jun 2026 06:55:26 +0000 (08:55 +0200)
committerJassi Brar <jassisinghbrar@gmail.com>
Sun, 21 Jun 2026 02:18:38 +0000 (21:18 -0500)
imx_mu_generic_tx() for the IMX_MU_TYPE_TXDB_V2 type polls on a register
which may timeout and is recognized as an error. This error is siltently
dropped and not dropped to the caller.

Forward the error to the caller.

Fixes: b5ef17917f3a7 ("mailbox: imx: fix TXDB_V2 channel race condition")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
drivers/mailbox/imx-mailbox.c

index 246a9a9e395206759342195f00cac4dd6ef065b0..0028073be4a71767138283e3c34bb8be59259206 100644 (file)
@@ -227,6 +227,7 @@ static int imx_mu_generic_tx(struct imx_mu_priv *priv,
        u32 val;
        int ret, count;
 
+       ret = 0;
        switch (cp->type) {
        case IMX_MU_TYPE_TX:
                imx_mu_write(priv, *arg, priv->dcfg->xTR + cp->idx * 4);
@@ -259,7 +260,7 @@ static int imx_mu_generic_tx(struct imx_mu_priv *priv,
                return -EINVAL;
        }
 
-       return 0;
+       return ret;
 }
 
 static int imx_mu_generic_rx(struct imx_mu_priv *priv,