]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mmc: meson-gx: remove unneeded checks in remove
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 7 Feb 2017 21:35:40 +0000 (22:35 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 14 Feb 2017 08:10:58 +0000 (09:10 +0100)
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>
drivers/mmc/host/meson-gx-mmc.c

index 4feb8971003e5548c9ab3c3a6dc4d251d96f3c27..3cc6334acdb19141fbd89d17ead929ebde490127 100644 (file)
@@ -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);