summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-02-07 22:35:40 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2017-02-14 09:10:58 +0100
commit62d721a646a9d515bd7b13bede78a1c02890b956 (patch)
tree34b669c617281104e6085f2846aa4ef4574dcb01 /drivers/mmc
parent4136fcb547d2baec31179aa0ce3466f4040b193c (diff)
mmc: meson-gx: remove unneeded checks in remove
The remove callback is called only if probe finished successfully. Therefore these checks are not needed. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Tested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/meson-gx-mmc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 4feb8971003e..3cc6334acdb1 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -808,15 +808,11 @@ static int meson_mmc_remove(struct platform_device *pdev)
{
struct meson_host *host = dev_get_drvdata(&pdev->dev);
- if (WARN_ON(!host))
- return 0;
-
/* disable interrupts */
writel(0, host->regs + SD_EMMC_IRQ_EN);
- if (host->bounce_buf)
- dma_free_coherent(host->dev, host->bounce_buf_size,
- host->bounce_buf, host->bounce_dma_addr);
+ dma_free_coherent(host->dev, host->bounce_buf_size,
+ host->bounce_buf, host->bounce_dma_addr);
clk_disable_unprepare(host->cfg_div_clk);
clk_disable_unprepare(host->core_clk);