Commit d519c863 authored by Adrian Hunter's avatar Adrian Hunter Committed by Ulf Hansson

mmc: sdhci: Add out_unlock to sdhci_execute_tuning

A 'goto' can be used to save duplicating unlocking
and returning.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Reviewed-by: default avatarAaron Lu <aaron.lu@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent ac00531d
...@@ -1909,9 +1909,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) ...@@ -1909,9 +1909,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
spin_unlock_irqrestore(&host->lock, flags); goto out_unlock;
sdhci_runtime_pm_put(host);
return 0;
} }
if (host->ops->platform_execute_tuning) { if (host->ops->platform_execute_tuning) {
...@@ -2066,6 +2064,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) ...@@ -2066,6 +2064,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); sdhci_writel(host, host->ier, SDHCI_INT_ENABLE);
sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE);
out_unlock:
spin_unlock_irqrestore(&host->lock, flags); spin_unlock_irqrestore(&host->lock, flags);
sdhci_runtime_pm_put(host); sdhci_runtime_pm_put(host);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment