Skip to content

Commit 8219efd

Browse files
Robin GongJassiBrar
authored andcommitted
mailbox: imx: fix crash in resume on i.mx8ulp
check 'priv->clk' before 'imx_mu_read()' otherwise crash happens on i.mx8ulp, since clock not enabled. Fixes: 4f0b776 ("mailbox: imx-mailbox: support i.MX8ULP MU") Reviewed-by: Jacky Bai <[email protected]> Signed-off-by: Robin Gong <[email protected]> Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 892cb52 commit 8219efd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mailbox/imx-mailbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ static int __maybe_unused imx_mu_resume_noirq(struct device *dev)
725725
* send failed, may lead to system freeze. This issue
726726
* is observed by testing freeze mode suspend.
727727
*/
728-
if (!imx_mu_read(priv, priv->dcfg->xCR[0]) && !priv->clk) {
728+
if (!priv->clk && !imx_mu_read(priv, priv->dcfg->xCR[0])) {
729729
for (i = 0; i < IMX_MU_xCR_MAX; i++)
730730
imx_mu_write(priv, priv->xcr[i], priv->dcfg->xCR[i]);
731731
}

0 commit comments

Comments
 (0)