summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/cavium-thunderx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/cavium-thunderx.c')
-rw-r--r--drivers/mmc/host/cavium-thunderx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
index fe3d77267cd6..b9cc95998799 100644
--- a/drivers/mmc/host/cavium-thunderx.c
+++ b/drivers/mmc/host/cavium-thunderx.c
@@ -146,6 +146,12 @@ static int thunder_mmc_probe(struct pci_dev *pdev,
return 0;
error:
+ for (i = 0; i < CAVIUM_MAX_MMC; i++) {
+ if (host->slot[i])
+ cvm_mmc_of_slot_remove(host->slot[i]);
+ if (host->slot_pdev[i])
+ of_platform_device_destroy(&host->slot_pdev[i]->dev, NULL);
+ }
clk_disable_unprepare(host->clk);
return ret;
}