[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220405070358.573540367@linuxfoundation.org>
Date: Tue, 5 Apr 2022 09:28:07 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jacky Bai <ping.bai@....com>,
Robin Gong <yibin.gong@....com>, Peng Fan <peng.fan@....com>,
Jassi Brar <jaswinder.singh@...aro.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.15 625/913] mailbox: imx: fix crash in resume on i.mx8ulp
From: Robin Gong <yibin.gong@....com>
[ 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@....com>
Signed-off-by: Robin Gong <yibin.gong@....com>
Signed-off-by: Peng Fan <peng.fan@....com>
Signed-off-by: Jassi Brar <jaswinder.singh@...aro.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/mailbox/imx-mailbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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]);
}
--
2.34.1
Powered by blists - more mailing lists