]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: sdhci-milbeaut: Drop the use of sdhci_free_host()
authorBinbin Zhou <zhoubinbin@loongson.cn>
Sat, 7 Jun 2025 07:35:07 +0000 (15:35 +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_free_host() is no longer needed.

Cc: Taichi Sugaya <sugaya.taichi@socionext.com>
Cc: Takao Orito <orito.takao@socionext.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/6d6ac2f5eb1962b96d63de70e6f52ad8fc785974.1749127796.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-milbeaut.c

index a4675456f9c78399eef421da508bd64db409344c..bda71d5966dca7ad1675186ad55e600d34b26b1e 100644 (file)
@@ -258,7 +258,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev)
 
        ret = mmc_of_parse(host->mmc);
        if (ret)
-               goto err;
+               return ret;
 
        platform_set_drvdata(pdev, host);
 
@@ -267,23 +267,19 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev)
        host->irq = irq;
 
        host->ioaddr = devm_platform_ioremap_resource(pdev, 0);
-       if (IS_ERR(host->ioaddr)) {
-               ret = PTR_ERR(host->ioaddr);
-               goto err;
-       }
+       if (IS_ERR(host->ioaddr))
+               return PTR_ERR(host->ioaddr);
 
        if (dev_of_node(dev)) {
                sdhci_get_of_property(pdev);
 
                priv->clk_iface = devm_clk_get(&pdev->dev, "iface");
-               if (IS_ERR(priv->clk_iface)) {
-                       ret = PTR_ERR(priv->clk_iface);
-                       goto err;
-               }
+               if (IS_ERR(priv->clk_iface))
+                       return PTR_ERR(priv->clk_iface);
 
                ret = clk_prepare_enable(priv->clk_iface);
                if (ret)
-                       goto err;
+                       return ret;
 
                priv->clk = devm_clk_get(&pdev->dev, "core");
                if (IS_ERR(priv->clk)) {
@@ -308,8 +304,6 @@ err_add_host:
        clk_disable_unprepare(priv->clk);
 err_clk:
        clk_disable_unprepare(priv->clk_iface);
-err:
-       sdhci_free_host(host);
        return ret;
 }
 
@@ -324,7 +318,6 @@ static void sdhci_milbeaut_remove(struct platform_device *pdev)
        clk_disable_unprepare(priv->clk_iface);
        clk_disable_unprepare(priv->clk);
 
-       sdhci_free_host(host);
        platform_set_drvdata(pdev, NULL);
 }