Skip to content

Commit

Permalink
mmc: sdhci: Add out_unlock to sdhci_execute_tuning
Browse files Browse the repository at this point in the history
A 'goto' can be used to save duplicating unlocking
and returning.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Adrian Hunter authored and Ulf Hansson committed Jan 12, 2015
1 parent ac00531 commit d519c86
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,9 +1909,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
/* FALLTHROUGH */

default:
spin_unlock_irqrestore(&host->lock, flags);
sdhci_runtime_pm_put(host);
return 0;
goto out_unlock;
}

if (host->ops->platform_execute_tuning) {
Expand Down Expand Up @@ -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_SIGNAL_ENABLE);
out_unlock:
spin_unlock_irqrestore(&host->lock, flags);
sdhci_runtime_pm_put(host);

Expand Down

0 comments on commit d519c86

Please sign in to comment.