From: Adrian Hunter Date: Tue, 12 Apr 2016 11:25:07 +0000 (+0300) Subject: mmc: sdhci: Remove redundant condition X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d310ae4936ccf1186851692c511483c794dd7701;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mmc: sdhci: Remove redundant condition 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 Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index dd1efed09be0..73edf44ad1ac 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -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)) {