[PATCH 22/34] mmc: sdhci-of-k1: Drop the use of sdhci_pltfm_free()
Binbin Zhou
zhoubinbin at loongson.cn
Sun May 25 23:06:44 PDT 2025
Since the devm_mmc_alloc_host() helper is already in
use, sdhci_pltfm_free() is no longer needed.
Cc: Yixun Lan <dlan at gentoo.org>
Cc: linux-riscv at lists.infradead.org
Cc: spacemit at lists.linux.dev
Signed-off-by: Binbin Zhou <zhoubinbin at loongson.cn>
---
drivers/mmc/host/sdhci-of-k1.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
index 6880d3e9ab62..40c1929f2de2 100644
--- a/drivers/mmc/host/sdhci-of-k1.c
+++ b/drivers/mmc/host/sdhci-of-k1.c
@@ -262,7 +262,7 @@ static int spacemit_sdhci_probe(struct platform_device *pdev)
ret = mmc_of_parse(host->mmc);
if (ret)
- goto err_pltfm;
+ return ret;
sdhci_get_of_property(pdev);
@@ -276,18 +276,11 @@ static int spacemit_sdhci_probe(struct platform_device *pdev)
host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
- if (spacemit_sdhci_get_clocks(dev, pltfm_host))
- goto err_pltfm;
-
- ret = sdhci_add_host(host);
+ ret = spacemit_sdhci_get_clocks(dev, pltfm_host);
if (ret)
- goto err_pltfm;
-
- return 0;
+ return ret;
-err_pltfm:
- sdhci_pltfm_free(pdev);
- return ret;
+ return sdhci_add_host(host);
}
static struct platform_driver spacemit_sdhci_driver = {
--
2.47.1
More information about the linux-riscv
mailing list