Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Wentao Liang <vulab@iscas.ac.cn>, <vigneshr@ti.com>,
	<ulf.hansson@linaro.org>
Cc: <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH v2] mmc: sdhci-omap: Add error handling for sdhci_runtime_suspend_host()
Date: Fri, 30 May 2025 15:28:11 +0300	[thread overview]
Message-ID: <cdc100af-cca9-4a70-86ce-a2bf673e5263@intel.com> (raw)
In-Reply-To: <20250521083846.718-1-vulab@iscas.ac.cn>

On 21/05/2025 11:38, Wentao Liang wrote:
> 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.

I think it's better to remove the return value instead:

	https://lore.kernel.org/linux-mmc/20250530122018.37250-1-adrian.hunter@intel.com/T/#u

> 
> Fixes: 51189eb9ddc8 ("mmc: sdhci-omap: Fix a lockdep warning for PM runtime init")
> Cc: stable@vger.kernel.org # 5.19
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
> v2: Fix code error.
> 
>  drivers/mmc/host/sdhci-omap.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c
> index 54d795205fb4..f09f78cf244d 100644
> --- a/drivers/mmc/host/sdhci-omap.c
> +++ b/drivers/mmc/host/sdhci-omap.c
> @@ -1438,12 +1438,16 @@ 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);
>  
> -	if (omap_host->con != -EINVAL)
> -		sdhci_runtime_suspend_host(host);
> +	if (omap_host->con != -EINVAL) {
> +		ret = sdhci_runtime_suspend_host(host);
> +		if (ret)
> +			return ret;
> +	}
>  
>  	sdhci_omap_context_save(omap_host);
>  


      reply	other threads:[~2025-05-30 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21  8:38 [PATCH v2] mmc: sdhci-omap: Add error handling for sdhci_runtime_suspend_host() Wentao Liang
2025-05-30 12:28 ` Adrian Hunter [this message]

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=cdc100af-cca9-4a70-86ce-a2bf673e5263@intel.com \
    --to=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 \
    --cc=vulab@iscas.ac.cn \
    /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