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  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:   Sat, 9 May 2020 13:51:20 +0300
From:   Dan Carpenter <>
To:     Colin King <>
Cc:     "David S . Miller" <>,,,
Subject: Re: [PATCH] cnic: remove redundant assignment to variable ret

On Fri, May 08, 2020 at 11:40:26PM +0100, Colin King wrote:
> From: Colin Ian King <>
> The variable ret is being assigned with a value that is never read,
> the assignment is redundant and can be removed.
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <>

We used to return negative error codes until commit 23021c21055f ("cnic:
Improve error recovery on bnx2x devices").

To be honest, I like the deliberate "ret = 0;" because this code will
trigger a static checker warning about wrong error codes.  Also it looks
wrong to human reviewers.  We should probably add a comment:

	/* Deliberately returning success */
	return 0;

dan carpenter

Powered by blists - more mailing lists