aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/cavium-thunderx.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-16 09:22:22 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-16 09:22:22 +0200
commit58f2c391cc0560231d7636c39d31b1b26c9396b7 (patch)
tree67956eea736a8763f67be8a52bcaf0d3fe4374f4 /drivers/mmc/host/cavium-thunderx.c
parentvmbus: add per-channel sysfs info (diff)
parentLinux 4.14-rc5 (diff)
downloadlinux-dev-58f2c391cc0560231d7636c39d31b1b26c9396b7.tar.xz
linux-dev-58f2c391cc0560231d7636c39d31b1b26c9396b7.zip
Merge 4.14-rc5 into char-misc-next
We need the fixes in here to resolve merge issues and for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mmc/host/cavium-thunderx.c')
-rw-r--r--drivers/mmc/host/cavium-thunderx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
index b9cc95998799..eee08d81b242 100644
--- a/drivers/mmc/host/cavium-thunderx.c
+++ b/drivers/mmc/host/cavium-thunderx.c
@@ -7,6 +7,7 @@
*
* Copyright (C) 2016 Cavium Inc.
*/
+#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/mmc/mmc.h>
@@ -149,8 +150,11 @@ 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])
+ if (host->slot_pdev[i]) {
+ get_device(&host->slot_pdev[i]->dev);
of_platform_device_destroy(&host->slot_pdev[i]->dev, NULL);
+ put_device(&host->slot_pdev[i]->dev);
+ }
}
clk_disable_unprepare(host->clk);
return ret;