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] [day] [month] [year] [list]
Date:   Tue, 05 Jan 2021 15:58:06 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     abaci-bugfix@...ux.alibaba.com
Cc:     kuba@...nel.org, dchickles@...vell.com, sburla@...vell.com,
        fmanlunas@...vell.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] liquidio: style: Identical condition and return
 expression 'retval', return value is always 0.

From: YANG LI <abaci-bugfix@...ux.alibaba.com>
Date: Wed, 30 Dec 2020 14:07:30 +0800

> The warning was because of the following line in function
> liquidio_set_fec():
> 
> retval = wait_for_sc_completion_timeout(oct, sc, 0);
>     if (retval)
> 	return (-EIO);
> 
> If this statement is not true, retval must be 0 and not updated
> later. So, It is better to return 0 directly.
> 
> Signed-off-by: YANG LI <abaci-bugfix@...ux.alibaba.com>
> Reported-by: Abaci <abaci@...ux.alibaba.com>

Maybe you can remove the rest of the 'retval' usage in this function
and even the variable itself?

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ