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

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

index 7f66d426c3c243c764eac2d6eac1468eadea5a24..dd084c8750f9905b1acf653df223a6b8def75e17 100644 (file)
@@ -2162,7 +2162,7 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
        ret = pcim_iomap_regions(pdev, BIT(bar), mmc_hostname(host->mmc));
        if (ret) {
                dev_err(&pdev->dev, "cannot request region\n");
-               goto cleanup;
+               return ERR_PTR(ret);
        }
 
        host->ioaddr = pcim_iomap_table(pdev)[bar];
@@ -2170,7 +2170,7 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
        if (chip->fixes && chip->fixes->probe_slot) {
                ret = chip->fixes->probe_slot(slot);
                if (ret)
-                       goto cleanup;
+                       return ERR_PTR(ret);
        }
 
        host->mmc->pm_caps = MMC_PM_KEEP_POWER;
@@ -2231,9 +2231,6 @@ remove:
        if (chip->fixes && chip->fixes->remove_slot)
                chip->fixes->remove_slot(slot, 0);
 
-cleanup:
-       sdhci_free_host(host);
-
        return ERR_PTR(ret);
 }
 
@@ -2254,8 +2251,6 @@ static void sdhci_pci_remove_slot(struct sdhci_pci_slot *slot)
 
        if (slot->chip->fixes && slot->chip->fixes->remove_slot)
                slot->chip->fixes->remove_slot(slot, dead);
-
-       sdhci_free_host(slot->host);
 }
 
 int sdhci_pci_uhs2_add_host(struct sdhci_pci_slot *slot)