summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/cavium-thunderx.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-05-26 20:46:35 -0400
committerDavid S. Miller <davem@davemloft.net>2017-05-26 20:46:35 -0400
commit34aa83c2fc23e055968387c8b78ac8bafd735aff (patch)
treea53a341d74613e512bf467ea12615f509cb53536 /drivers/mmc/host/cavium-thunderx.c
parent47936d35edbac5e58064bd15e51136050b2f2717 (diff)
parente2a9aa5ab2a4d1fb05fcdfa9661d54e437093297 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Overlapping changes in drivers/net/phy/marvell.c, bug fix in 'net' restricting a HW workaround alongside cleanups in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
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;
}