From: Adrian Hunter <adrian.hunter@intel.com>
To: Jiawen Liu <1298662399@qq.com>, Ben Dooks <ben-linux@fluff.org>,
"Jaehoon Chung" <jh80.chung@samsung.com>,
Ulf Hansson <ulfh@kernel.org>
Cc: <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: sdhci-s3c: handle interface clock enable failures
Date: Thu, 3 Dec 2026 09:28:26 +0200 [thread overview]
Message-ID: <bb370ff2-c433-4161-81c9-cbf4f11679e7@intel.com> (raw)
In-Reply-To: <tencent_AD6918D0E637A7B2AD5EAA6810724C57C705@qq.com>
On 29/11/2026 14:58, Jiawen Liu wrote:
> sdhci_s3c_probe() ignores the result of enabling the hsmmc interface
> clock. The clock helper unwinds partial preparation on failure, but probe
> continues into controller setup without a successful enable. A later
> probe error also reaches cleanup that assumes the clock was enabled.
>
> Propagate the original error immediately and leave the successful-enable
> cleanup labels for paths that actually acquired the reference.
>
> Fixes: 0f310a057feb ("mmc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepare")
> Signed-off-by: Jiawen Liu <1298662399@qq.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-s3c.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index ca6120adb21ed..e847ed93a42e9 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -534,7 +534,9 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
> }
>
> /* enable the local io clock and keep it running for the moment. */
> - clk_prepare_enable(sc->clk_io);
> + ret = clk_prepare_enable(sc->clk_io);
> + if (ret)
> + return dev_err_probe(dev, ret, "failed to enable io clock\n");
>
> for (clks = 0, ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
> char name[14];
prev parent reply other threads:[~2026-12-03 7:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 12:58 [PATCH] mmc: sdhci-s3c: handle interface clock enable failures Jiawen Liu
2026-11-29 19:44 ` Markus Elfring
2026-12-03 7: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=bb370ff2-c433-4161-81c9-cbf4f11679e7@intel.com \
--to=adrian.hunter@intel.com \
--cc=1298662399@qq.com \
--cc=ben-linux@fluff.org \
--cc=jh80.chung@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulfh@kernel.org \
/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