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: <f4fd942e-2bc8-b70b-d8ec-56690750efbb@intel.com>
Date:   Mon, 13 Jun 2022 10:14:12 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
        Patrice Chotard <patrice.chotard@...s.st.com>,
        Ulf Hansson <ulf.hansson@...aro.org>
Cc:     kernel@...gutronix.de, linux-mmc@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] mmc: sdhci-st: Obviously always return success in
 remove callback

On 11/06/22 00:12, Uwe Kleine-König wrote:
> sdhci_pltfm_unregister() returns 0 unconditionally and returning an
> error in a platform remove callback isn't very sensible. (The only
> effect of the latter is that the device core emits a generic warning and
> then removes the device anyhow.)
> 
> So return 0 unconditionally to make it obvious there is no error
> forwarded to the upper layers.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>

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

> ---
>  drivers/mmc/host/sdhci-st.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
> index d41582c21aa3..6415916fbd91 100644
> --- a/drivers/mmc/host/sdhci-st.c
> +++ b/drivers/mmc/host/sdhci-st.c
> @@ -440,15 +440,14 @@ static int sdhci_st_remove(struct platform_device *pdev)
>  	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>  	struct st_mmc_platform_data *pdata = sdhci_pltfm_priv(pltfm_host);
>  	struct reset_control *rstc = pdata->rstc;
> -	int ret;
>  
> -	ret = sdhci_pltfm_unregister(pdev);
> +	sdhci_pltfm_unregister(pdev);
>  
>  	clk_disable_unprepare(pdata->icnclk);
>  
>  	reset_control_assert(rstc);
>  
> -	return ret;
> +	return 0;
>  }
>  
>  #ifdef CONFIG_PM_SLEEP

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ