Commit 77811ffa authored by vulab's avatar vulab Committed by Ulf Hansson
Browse files

mmc: omap-hsmmc: remove redundant null check



Because clk_disable_unprepare already checked NULL clock parameter, so the
additional checks are unnecessary, just remove them.

Signed-off-by: default avatarXu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20200903084825.85616-1-vulab@iscas.ac.cn


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5de1a3e3
Loading
Loading
Loading
Loading
+6 −12
Original line number Diff line number Diff line
@@ -1114,7 +1114,6 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd)
	int ret;

	/* Disable the clocks */
	if (host->dbclk)
	clk_disable_unprepare(host->dbclk);

	/* Turn the power off */
@@ -1123,7 +1122,6 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd)
	/* Turn the power ON with given VDD 1.8 or 3.0v */
	if (!ret)
		ret = omap_hsmmc_set_power(host, 1);
	if (host->dbclk)
	clk_prepare_enable(host->dbclk);

	if (ret != 0)
@@ -2014,7 +2012,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
	pm_runtime_dont_use_autosuspend(host->dev);
	pm_runtime_put_sync(host->dev);
	pm_runtime_disable(host->dev);
	if (host->dbclk)
	clk_disable_unprepare(host->dbclk);
err1:
	mmc_free_host(mmc);
@@ -2037,7 +2034,6 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
	pm_runtime_put_sync(host->dev);
	pm_runtime_disable(host->dev);
	device_init_wakeup(&pdev->dev, false);
	if (host->dbclk)
	clk_disable_unprepare(host->dbclk);

	mmc_free_host(host->mmc);
@@ -2063,7 +2059,6 @@ static int omap_hsmmc_suspend(struct device *dev)
				OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP);
	}

	if (host->dbclk)
	clk_disable_unprepare(host->dbclk);

	pm_runtime_put_sync(host->dev);
@@ -2080,7 +2075,6 @@ static int omap_hsmmc_resume(struct device *dev)

	pm_runtime_get_sync(host->dev);

	if (host->dbclk)
	clk_prepare_enable(host->dbclk);

	if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER))