From: Wentao Liang <vulab@iscas.ac.cn>
To: adrian.hunter@intel.com, vigneshr@ti.com, ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Wentao Liang <vulab@iscas.ac.cn>,
stable@vger.kernel.org
Subject: [PATCH] mmc: sdhci-omap: Add error handling for sdhci_runtime_suspend_host()
Date: Mon, 19 May 2025 20:51:43 +0800 [thread overview]
Message-ID: <20250519125143.2331-1-vulab@iscas.ac.cn> (raw)
The sdhci_omap_runtime_suspend() calls sdhci_runtime_suspend_host() but
does not handle the return value. A proper implementation can be found
in sdhci_am654_runtime_suspend().
Add error handling for sdhci_runtime_suspend_host(). Return the error
code if the suspend fails.
Fixes: f433e8aac6b9 ("mmc: sdhci-omap: Implement PM runtime functions")
Cc: stable@vger.kernel.org # v5.16
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/mmc/host/sdhci-omap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c
index 54d795205fb4..69b2e4e5cb20 100644
--- a/drivers/mmc/host/sdhci-omap.c
+++ b/drivers/mmc/host/sdhci-omap.c
@@ -1438,6 +1438,7 @@ static int __maybe_unused sdhci_omap_runtime_suspend(struct device *dev)
struct sdhci_host *host = dev_get_drvdata(dev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
struct sdhci_omap_host *omap_host = sdhci_pltfm_priv(pltfm_host);
+ int ret;
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
mmc_retune_needed(host->mmc);
@@ -1445,7 +1446,9 @@ static int __maybe_unused sdhci_omap_runtime_suspend(struct device *dev)
if (omap_host->con != -EINVAL)
sdhci_runtime_suspend_host(host);
- sdhci_omap_context_save(omap_host);
+ ret = sdhci_omap_context_save(omap_host);
+ if (ret)
+ return ret;
pinctrl_pm_select_idle_state(dev);
--
2.42.0.windows.2
next reply other threads:[~2025-05-19 12:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 12:51 Wentao Liang [this message]
2025-05-20 0:09 ` [PATCH] mmc: sdhci-omap: Add error handling for sdhci_runtime_suspend_host() kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250519125143.2331-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=adrian.hunter@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox