mmc: sdhci-pxav3: Remove checks for optional core clock in error/remove path

Commit 63589e92c2 ("clk: Ignore error and NULL pointers passed to
clk_{unprepare, disable}()") allows NULL or error pointer to be passed
unconditionally.

This patch is to simplify probe error and remove code paths.

However, we reserve the core clock checks in runtime suspend/resume code
because we want a little smaller latency.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Jisheng Zhang 2015-01-05 15:59:19 +08:00 committed by Ulf Hansson
parent be186ad582
commit c25d9e1bda
1 changed files with 2 additions and 4 deletions

View File

@ -398,8 +398,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
err_cd_req:
err_mbus_win:
clk_disable_unprepare(pxa->clk_io);
if (!IS_ERR(pxa->clk_core))
clk_disable_unprepare(pxa->clk_core);
clk_disable_unprepare(pxa->clk_core);
err_clk_get:
sdhci_pltfm_free(pdev);
return ret;
@ -418,8 +417,7 @@ static int sdhci_pxav3_remove(struct platform_device *pdev)
sdhci_remove_host(host, 1);
clk_disable_unprepare(pxa->clk_io);
if (!IS_ERR(pxa->clk_core))
clk_disable_unprepare(pxa->clk_core);
clk_disable_unprepare(pxa->clk_core);
sdhci_pltfm_free(pdev);