From: Ben Chuang Date: Wed, 30 Oct 2024 01:53:26 +0000 (+0800) Subject: mmc: sdhci-uhs2: Remove unnecessary NULL check X-Git-Tag: v6.13-rc1~153^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54ef4b393e0396a0c82bebb733e09c184c7ac943;p=thirdparty%2Fkernel%2Flinux.git mmc: sdhci-uhs2: Remove unnecessary NULL check The host->ops pointer can't be NULL in sdhci_uhs2_do_detect_init(). Let's drop the redundant check. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202410271835.tqz9s9JV-lkp@intel.com/ Signed-off-by: Ben Chuang Acked-by: Adrian Hunter Message-ID: <20241030015326.2289070-1-benchuanggli@gmail.com> Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c index c488c6d56015f..b0e4ab852a944 100644 --- a/drivers/mmc/host/sdhci-uhs2.c +++ b/drivers/mmc/host/sdhci-uhs2.c @@ -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)) {