]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: sdhci-of-dwcmshc: Drop the use of sdhci_pltfm_free()
authorBinbin Zhou <zhoubinbin@loongson.cn>
Sat, 7 Jun 2025 07:39:01 +0000 (15:39 +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.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/01b6797d55562e124599663e859dd9b7d4e4d8e0.1749127796.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-of-dwcmshc.c

index a20d03fdd6a93ecc5229c71f825bade5ac730370..ee6b1096f70921aeabbf8f615622bfbb0980cd54 100644 (file)
@@ -1387,14 +1387,13 @@ static int dwcmshc_probe(struct platform_device *pdev)
 
        if (dev->of_node) {
                pltfm_host->clk = devm_clk_get(dev, "core");
-               if (IS_ERR(pltfm_host->clk)) {
-                       err = PTR_ERR(pltfm_host->clk);
-                       dev_err(dev, "failed to get core clk: %d\n", err);
-                       goto free_pltfm;
-               }
+               if (IS_ERR(pltfm_host->clk))
+                       return dev_err_probe(dev, PTR_ERR(pltfm_host->clk),
+                                            "failed to get core clk\n");
+
                err = clk_prepare_enable(pltfm_host->clk);
                if (err)
-                       goto free_pltfm;
+                       return err;
 
                priv->bus_clk = devm_clk_get(dev, "bus");
                if (!IS_ERR(priv->bus_clk))
@@ -1467,8 +1466,6 @@ err_clk:
        clk_disable_unprepare(pltfm_host->clk);
        clk_disable_unprepare(priv->bus_clk);
        clk_bulk_disable_unprepare(priv->num_other_clks, priv->other_clks);
-free_pltfm:
-       sdhci_pltfm_free(pdev);
        return err;
 }
 
@@ -1500,7 +1497,6 @@ static void dwcmshc_remove(struct platform_device *pdev)
        clk_disable_unprepare(pltfm_host->clk);
        clk_disable_unprepare(priv->bus_clk);
        clk_bulk_disable_unprepare(priv->num_other_clks, priv->other_clks);
-       sdhci_pltfm_free(pdev);
 }
 
 #ifdef CONFIG_PM_SLEEP