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: <2c28311c-bef0-a3f4-7b65-51bf122f5911@gmail.com>
Date:   Sat, 12 Nov 2016 22:40:03 +0100
From:   Marek Vasut <marek.vasut@...il.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        linux-mtd@...ts.infradead.org
Cc:     Alan Cox <alan@...ux.intel.com>,
        David Woodhouse <David.Woodhouse@...el.com>,
        Jason Roberts <jason.e.roberts@...el.com>,
        Chuanxiao Dong <chuanxiao.dong@...el.com>,
        Dinh Nguyen <dinguyen@...era.com>,
        linux-kernel@...r.kernel.org,
        Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Brian Norris <computersforpeace@...il.com>,
        Richard Weinberger <richard@....at>,
        David Woodhouse <dwmw2@...radead.org>,
        Cyrille Pitchen <cyrille.pitchen@...el.com>
Subject: Re: [PATCH 09/11] mtd: nand: denali: return error code from
 nand_scan_ident/tail on error

On 11/09/2016 05:35 AM, Masahiro Yamada wrote:
> The nand_scan_ident/tail() returns an appropriate error value when
> it fails.  Use it instead of the fixed -ENXIO.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>

Reviewed-by: Marek Vasut <marek.vasut@...il.com>

> ---
> 
>  drivers/mtd/nand/denali.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
> index f188a48..d482d8d 100644
> --- a/drivers/mtd/nand/denali.c
> +++ b/drivers/mtd/nand/denali.c
> @@ -1474,10 +1474,9 @@ int denali_init(struct denali_nand_info *denali)
>  	 * this is the first stage in a two step process to register
>  	 * with the nand subsystem
>  	 */
> -	if (nand_scan_ident(mtd, denali->max_banks, NULL)) {
> -		ret = -ENXIO;
> +	ret = nand_scan_ident(mtd, denali->max_banks, NULL);
> +	if (ret)
>  		goto failed_req_irq;
> -	}
>  
>  	/* allocate the right size buffer now */
>  	devm_kfree(denali->dev, denali->buf.buf);
> @@ -1580,10 +1579,9 @@ int denali_init(struct denali_nand_info *denali)
>  	denali->nand.ecc.write_oob = denali_write_oob;
>  	denali->nand.erase = denali_erase;
>  
> -	if (nand_scan_tail(mtd)) {
> -		ret = -ENXIO;
> +	ret = nand_scan_tail(mtd);
> +	if (ret)
>  		goto failed_req_irq;
> -	}
>  
>  	ret = mtd_device_register(mtd, NULL, 0);
>  	if (ret) {
> 


-- 
Best regards,
Marek Vasut

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ