mmc: sdhci: Add out_unlock to sdhci_execute_tuning
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 5 Dec 2014 17:25:29 +0000 (19:25 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 12 Jan 2015 09:14:55 +0000 (10:14 +0100)
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>
drivers/mmc/host/sdhci.c

index 040158d4fc9ac8d11d30283f058b8846de0b1d8f..c45beaff1ab5a926eedfcbb279ec349317a0aa71 100644 (file)
@@ -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) {
@@ -2066,6 +2064,7 @@ out:
 
        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);