Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Aubin Constans <aubin.constans@microchip.com>
To: Gu Bowen <gubowen5@huawei.com>, <ulf.hansson@linaro.org>
Cc: <nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
	<claudiu.beznea@tuxon.dev>, <ludovic.desroches@microchip.com>,
	<linux-mmc@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <wangweiyang2@huawei.com>
Subject: Re: [PATCH -next] mmc: atmel-mci: Add missing clk_disable_unprepare()
Date: Fri, 28 Feb 2025 19:39:53 +0100	[thread overview]
Message-ID: <d1a9fc41-35df-4b30-83cc-5589a649c7ff@microchip.com> (raw)
In-Reply-To: <20250225022856.3452240-1-gubowen5@huawei.com>

On 25/02/2025 03:28, Gu Bowen wrote:
> The error path when atmci_configure_dma() set dma fails in atmci driver
> does not correctly disable the clock.
> Add the missing clk_disable_unprepare() to the error path for pair with
> clk_prepare_enable().
> 
> Fixes: 467e081d23e6 ("mmc: atmel-mci: use probe deferring if dma controller is not ready yet")
> Signed-off-by: Gu Bowen <gubowen5@huawei.com>

Acked-by: Aubin Constans <aubin.constans@microchip.com>

> ---
>   drivers/mmc/host/atmel-mci.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index fc360902729d..24fffc702a94 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -2499,8 +2499,10 @@ static int atmci_probe(struct platform_device *pdev)
>          /* Get MCI capabilities and set operations according to it */
>          atmci_get_cap(host);
>          ret = atmci_configure_dma(host);
> -       if (ret == -EPROBE_DEFER)
> +       if (ret == -EPROBE_DEFER) {
> +               clk_disable_unprepare(host->mck);
>                  goto err_dma_probe_defer;
> +       }
>          if (ret == 0) {
>                  host->prepare_data = &atmci_prepare_data_dma;
>                  host->submit_data = &atmci_submit_data_dma;
> --
> 2.25.1
> 

Thank you for having identified and fixed this.

  reply	other threads:[~2025-02-28 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25  2:28 [PATCH -next] mmc: atmel-mci: Add missing clk_disable_unprepare() Gu Bowen
2025-02-28 18:39 ` Aubin Constans [this message]
2025-03-12 11:24 ` Ulf Hansson

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=d1a9fc41-35df-4b30-83cc-5589a649c7ff@microchip.com \
    --to=aubin.constans@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=gubowen5@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wangweiyang2@huawei.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