diff options
author | 2016-07-15 10:54:08 +0900 | |
---|---|---|
committer | 2016-09-26 21:31:18 +0200 | |
commit | 7037f3beae352faa478ff5729c308756233ef4d3 (patch) | |
tree | b6e757fecb7e6a189615d7f653d3d95712401900 | |
parent | mmc: dw_mmc: remove parsing for each slot subnode (diff) | |
download | linux-7037f3beae352faa478ff5729c308756233ef4d3.tar.gz linux-7037f3beae352faa478ff5729c308756233ef4d3.tar.bz2 linux-7037f3beae352faa478ff5729c308756233ef4d3.zip |
mmc: dw_mmc: remove the unnecessary IS_ERR() checking for ciu/biu clock
If ciu/biu clock are NULL, clk_disable_unprepare should be just
returned. In clk_disable_unprepare(), already checked whether clk is
error or NULL.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index cea26ab4f97d..1a1e1e1ac7c1 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -3151,12 +3151,10 @@ err_dmaunmap: host->dma_ops->exit(host); err_clk_ciu: - if (!IS_ERR(host->ciu_clk)) - clk_disable_unprepare(host->ciu_clk); + clk_disable_unprepare(host->ciu_clk); err_clk_biu: - if (!IS_ERR(host->biu_clk)) - clk_disable_unprepare(host->biu_clk); + clk_disable_unprepare(host->biu_clk); return ret; } @@ -3182,11 +3180,8 @@ void dw_mci_remove(struct dw_mci *host) if (host->use_dma && host->dma_ops->exit) host->dma_ops->exit(host); - if (!IS_ERR(host->ciu_clk)) - clk_disable_unprepare(host->ciu_clk); - - if (!IS_ERR(host->biu_clk)) - clk_disable_unprepare(host->biu_clk); + clk_disable_unprepare(host->ciu_clk); + clk_disable_unprepare(host->biu_clk); } EXPORT_SYMBOL(dw_mci_remove); |