[PATCH v2 2/8] mmc: sdhci-of-k1: Handle clock probe deferral

From: Yixun Lan

Date: Tue Dec 01 2026 - 03:21:51 EST


Propagate the error code when clock subsystem isn't ready, so
it will fallback to proper probe deferral mechanism.

Fixes: e5502d15b0f3 ("mmc: sdhci-of-k1: add support for SpacemiT K1 SoC")
Signed-off-by: Yixun Lan <dlan@xxxxxxxxxx>
---
drivers/mmc/host/sdhci-of-k1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
index 010a871c7f25..3169f360399e 100644
--- a/drivers/mmc/host/sdhci-of-k1.c
+++ b/drivers/mmc/host/sdhci-of-k1.c
@@ -449,11 +449,11 @@ static inline int spacemit_sdhci_get_clocks(struct device *dev,

sdhst->clk_core = devm_clk_get_enabled(dev, "core");
if (IS_ERR(sdhst->clk_core))
- return -EINVAL;
+ return PTR_ERR(sdhst->clk_core);

sdhst->clk_io = devm_clk_get_enabled(dev, "io");
if (IS_ERR(sdhst->clk_io))
- return -EINVAL;
+ return PTR_ERR(sdhst->clk_io);

pltfm_host->clk = sdhst->clk_io;


--
2.56.0