diff options
author | Robin Gong <yibin.gong@nxp.com> | 2022-02-07 04:52:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 15:23:48 +0300 |
commit | 8bddc0227e78edea1da2da357d1e184ccd2c25e8 (patch) | |
tree | c60dc93c4b73653e11e417bbf00cb09591feb1ed /drivers/mailbox | |
parent | 613e1b253f6dfa9e68c14e2b7db1bf170ddff2e8 (diff) | |
download | linux-8bddc0227e78edea1da2da357d1e184ccd2c25e8.tar.xz |
mailbox: imx: fix crash in resume on i.mx8ulp
[ Upstream commit 8219efd08a0aa1d7944bdb66d84ba57549258968 ]
check 'priv->clk' before 'imx_mu_read()' otherwise crash happens on
i.mx8ulp, since clock not enabled.
Fixes: 4f0b776ef5831 ("mailbox: imx-mailbox: support i.MX8ULP MU")
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r-- | drivers/mailbox/imx-mailbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 0ce75c6b36b6..2aeef0bc6930 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -668,7 +668,7 @@ static int __maybe_unused imx_mu_resume_noirq(struct device *dev) * send failed, may lead to system freeze. This issue * is observed by testing freeze mode suspend. */ - if (!imx_mu_read(priv, priv->dcfg->xCR[0]) && !priv->clk) { + if (!priv->clk && !imx_mu_read(priv, priv->dcfg->xCR[0])) { for (i = 0; i < IMX_MU_xCR_MAX; i++) imx_mu_write(priv, priv->xcr[i], priv->dcfg->xCR[i]); } |