]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: sdhci-npcm: Drop the use of sdhci_pltfm_free()
authorBinbin Zhou <zhoubinbin@loongson.cn>
Sat, 7 Jun 2025 07:37:40 +0000 (15:37 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Jun 2025 10:43:25 +0000 (12:43 +0200)
Since the devm_mmc_alloc_host() helper is already in use,
sdhci_pltfm_free() is no longer needed.

Cc: Avi Fishman <avifishman70@gmail.com>
Cc: Tomer Maimon <tmaimon77@gmail.com>
Cc: Tali Perry <tali.perry1@gmail.com>
Cc: Patrick Venture <venture@google.com>
Cc: Nancy Yuen <yuenn@google.com>
Cc: Benjamin Fair <benjaminfair@google.com>
Cc: openbmc@lists.ozlabs.org
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/08f9a1f6c2a1ad908baaf01623cd9670bf540aa3.1749127796.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-npcm.c

index bee0585ba5c13110062415f22ced639508afc034..71b635dfdf1dde592509f6d8528cd14856f7bd43 100644 (file)
@@ -48,8 +48,7 @@ static int npcm_sdhci_probe(struct platform_device *pdev)
 
        pltfm_host->clk = devm_clk_get_optional_enabled(dev, NULL);
        if (IS_ERR(pltfm_host->clk)) {
-               ret = PTR_ERR(pltfm_host->clk);
-               goto err_sdhci;
+               return PTR_ERR(pltfm_host->clk);
        }
 
        caps = sdhci_readl(host, SDHCI_CAPABILITIES);
@@ -58,17 +57,9 @@ static int npcm_sdhci_probe(struct platform_device *pdev)
 
        ret = mmc_of_parse(host->mmc);
        if (ret)
-               goto err_sdhci;
+               return ret;
 
-       ret = sdhci_add_host(host);
-       if (ret)
-               goto err_sdhci;
-
-       return 0;
-
-err_sdhci:
-       sdhci_pltfm_free(pdev);
-       return ret;
+       return sdhci_add_host(host);
 }
 
 static const struct of_device_id npcm_sdhci_of_match[] = {