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

Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/c6496a92e47bfc70550759db5f6eba5564bb4a7d.1749127796.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-iproc.c

index 80b2567a488bffb562004826f7f91f78f072a102..35ef5c5f51467ab83335ff3e26223d50ff61eb58 100644 (file)
@@ -379,7 +379,7 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
 
        ret = mmc_of_parse(host->mmc);
        if (ret)
-               goto err;
+               return ret;
 
        sdhci_get_property(pdev);
 
@@ -387,10 +387,8 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
 
        if (dev->of_node) {
                pltfm_host->clk = devm_clk_get_enabled(dev, NULL);
-               if (IS_ERR(pltfm_host->clk)) {
-                       ret = PTR_ERR(pltfm_host->clk);
-                       goto err;
-               }
+               if (IS_ERR(pltfm_host->clk))
+                       return PTR_ERR(pltfm_host->clk);
        }
 
        if (iproc_host->data->missing_caps) {
@@ -399,15 +397,7 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
                                  &iproc_host->data->caps1);
        }
 
-       ret = sdhci_add_host(host);
-       if (ret)
-               goto err;
-
-       return 0;
-
-err:
-       sdhci_pltfm_free(pdev);
-       return ret;
+       return sdhci_add_host(host);
 }
 
 static void sdhci_iproc_shutdown(struct platform_device *pdev)