Skip to content

Commit 3358b83

Browse files
Dan Carpenterstorulf
authored andcommitted
mmc: sdhci-of-k1: Fix error code in probe()
If spacemit_sdhci_get_clocks() fails, then propagate the error code. Don't return success. Fixes: e5502d1 ("mmc: sdhci-of-k1: add support for SpacemiT K1 SoC") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Yixun Lan <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 009c3a4 commit 3358b83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/mmc/host/sdhci-of-k1.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ static int spacemit_sdhci_probe(struct platform_device *pdev)
276276

277277
host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
278278

279-
if (spacemit_sdhci_get_clocks(dev, pltfm_host))
279+
ret = spacemit_sdhci_get_clocks(dev, pltfm_host);
280+
if (ret)
280281
goto err_pltfm;
281282

282283
ret = sdhci_add_host(host);

0 commit comments

Comments
 (0)