lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a9d2d51-81c0-407d-ad0f-2c1202f15935@intel.com>
Date: Wed, 30 Oct 2024 11:41:08 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Ben Chuang <benchuanggli@...il.com>, ulf.hansson@...aro.org
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
 ben.chuang@...esyslogic.com.tw, greg.tu@...esyslogic.com.tw,
 HL.Liu@...esyslogic.com.tw, victor.shih@...esyslogic.com.tw,
 dan.carpenter@...aro.org, takahiro.akashi@...aro.org
Subject: Re: [PATCH] mmc: sdhci-uhs2: Remove unnecessary NULL check

On 30/10/24 03:53, Ben Chuang wrote:
> From: Ben Chuang <ben.chuang@...esyslogic.com.tw>
> 
> The "host->ops" pointer points to an offset into the "sdhci_ops" struct
> so it cannot be NULL. Remove "host->ops" check in "if" statement.

It is a pointer, so it could be NULL, but it never will be in this
function.

> 
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Closes: https://lore.kernel.org/r/202410271835.tqz9s9JV-lkp@intel.com/
> Signed-off-by: Ben Chuang <ben.chuang@...esyslogic.com.tw>

Apart from commit message:

Acked-by: Adrian Hunter <adrian.hunter@...el.com>

> ---
>  drivers/mmc/host/sdhci-uhs2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c
> index c488c6d56015..b0e4ab852a94 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)) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ