aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/wmt-sdmmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/wmt-sdmmc.c')
-rw-r--r--drivers/mmc/host/wmt-sdmmc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 21ebba88679c..fd30ac7da5e5 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -726,7 +726,7 @@ static int wmt_mci_get_cd(struct mmc_host *mmc)
return !(cd ^ priv->cd_inverted);
}
-static struct mmc_host_ops wmt_mci_ops = {
+static const struct mmc_host_ops wmt_mci_ops = {
.request = wmt_mci_request,
.set_ios = wmt_mci_set_ios,
.get_ro = wmt_mci_get_ro,
@@ -856,7 +856,9 @@ static int wmt_mci_probe(struct platform_device *pdev)
goto fail5;
}
- clk_prepare_enable(priv->clk_sdmmc);
+ ret = clk_prepare_enable(priv->clk_sdmmc);
+ if (ret)
+ goto fail6;
/* configure the controller to a known 'ready' state */
wmt_reset_hardware(mmc);
@@ -866,6 +868,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "WMT SDHC Controller initialized\n");
return 0;
+fail6:
+ clk_put(priv->clk_sdmmc);
fail5:
free_irq(dma_irq, priv);
fail4: