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: <20230901154242.12417f09@xps-13>
Date:   Fri, 1 Sep 2023 15:42:42 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Dembskiy Igor <dii@....spb.ru>
Cc:     Alexey Khoroshilov <khoroshilov@...ras.ru>,
        Boris Brezillon <bbrezillon@...nel.org>,
        Richard Weinberger <richard@....at>,
        Akinobu Mita <akinobu.mita@...il.com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        lvc-project@...uxtesting.org
Subject: Re: [PATCH] mtd: tests: remove useless checks

Hi Igor,

dii@....spb.ru wrote on Fri,  1 Sep 2023 16:36:41 +0300:

> Return value of mtdtest_scan_for_bad_() is always 0. So it causes senseless
> checks in some functions such as mtd_subpagetest_init().
> 
> Fixes: 084db4b020c7 ("mtd: tests: introduce helper functions")
> Signed-off-by: Dembskiy Igor <dii@....spb.ru>
> ---
>  drivers/mtd/tests/oobtest.c     | 2 --
>  drivers/mtd/tests/pagetest.c    | 2 --
>  drivers/mtd/tests/readtest.c    | 2 --
>  drivers/mtd/tests/speedtest.c   | 3 +--
>  drivers/mtd/tests/stresstest.c  | 2 --
>  drivers/mtd/tests/subpagetest.c | 2 --
>  drivers/mtd/tests/torturetest.c | 2 --
>  7 files changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/drivers/mtd/tests/oobtest.c b/drivers/mtd/tests/oobtest.c
> index 13fed398937e..976f40a5656e 100644
> --- a/drivers/mtd/tests/oobtest.c
> +++ b/drivers/mtd/tests/oobtest.c
> @@ -399,8 +399,6 @@ static int __init mtd_oobtest_init(void)
>  	pr_info("test 1 of 5\n");
>  
>  	err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt);
> -	if (err)
> -		goto out;

What's the point of keeping "err =" or even keeping a return value if
void would be more appropriate?

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ