mmc: sdhci: Remove redundant condition
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 12 Apr 2016 11:25:07 +0000 (14:25 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 2 May 2016 08:33:28 +0000 (10:33 +0200)
The logic '!mmc.f_max || (mmc.f_max && mmc.f_max > max_clk)'
is equivalent to '!mmc.f_max || mmc.f_max > max_clk'.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c

index dd1efed09be0e19fd52d648ea42b6aa62b43d532..73edf44ad1ac060ea86ab35bd8d3eefe4a3dd7b3 100644 (file)
@@ -3002,7 +3002,7 @@ int sdhci_add_host(struct sdhci_host *host)
        } else
                mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200;
 
-       if (!mmc->f_max || (mmc->f_max && (mmc->f_max > max_clk)))
+       if (!mmc->f_max || mmc->f_max > max_clk)
                mmc->f_max = max_clk;
 
        if (!(host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)) {