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: <d91d6e3c-da8c-0601-0cd7-45bfe7c4ad50@gmail.com>
Date:   Wed, 22 Mar 2023 12:18:01 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...il.com>
To:     ye.xingchen@....com.cn, ulf.hansson@...aro.org
Cc:     paul@...pouillou.net, linux-mips@...r.kernel.org,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: jz4740: Use dev_err_probe()

On 3/22/23 12:07 PM, ye.xingchen@....com.cn wrote:

> From: Ye Xingchen <ye.xingchen@....com.cn>
> 
> Replace the open-code with dev_err_probe() to simplify the code.
> 
> Signed-off-by: Ye Xingchen <ye.xingchen@....com.cn>
> ---
>  drivers/mmc/host/jz4740_mmc.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
> index 698450afa7bb..a6ad03b24add 100644
> --- a/drivers/mmc/host/jz4740_mmc.c
> +++ b/drivers/mmc/host/jz4740_mmc.c
> @@ -232,10 +232,7 @@ static int jz4740_mmc_acquire_dma_channels(struct jz4740_mmc_host *host)
>  	if (!IS_ERR(host->dma_tx))
>  		return 0;
> 
> -	if (PTR_ERR(host->dma_tx) != -ENODEV) {
> -		dev_err(dev, "Failed to get dma tx-rx channel\n");
> -		return PTR_ERR(host->dma_tx);
> -	}
> +	return dev_err_probe(dev, PTR_ERR(host->dma_tx), "Failed to get dma tx-rx channel\n");

   I'm afraid this makes the following code unreachable...

> 
>  	host->dma_tx = dma_request_chan(mmc_dev(host->mmc), "tx");
>  	if (IS_ERR(host->dma_tx)) {

MBR, Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ