]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mmc: sdhci-uhs2: Remove unnecessary NULL check
authorBen Chuang <ben.chuang@genesyslogic.com.tw>
Wed, 30 Oct 2024 01:53:26 +0000 (09:53 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Oct 2024 11:02:47 +0000 (12:02 +0100)
The host->ops pointer can't be NULL in sdhci_uhs2_do_detect_init(). Let's
drop the redundant check.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202410271835.tqz9s9JV-lkp@intel.com/
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241030015326.2289070-1-benchuanggli@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-uhs2.c

index c488c6d56015f7e0ba34f315bd35ff62a84e0b47..b0e4ab852a94402a930fa70bb8d011ecb391a146 100644 (file)
@@ -413,7 +413,7 @@ static int sdhci_uhs2_do_detect_init(struct mmc_host *mmc)
 
        DBG("Begin do uhs2 detect init.\n");
 
-       if (host->ops && host->ops->uhs2_pre_detect_init)
+       if (host->ops->uhs2_pre_detect_init)
                host->ops->uhs2_pre_detect_init(host);
 
        if (sdhci_uhs2_interface_detect(host)) {