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]
Date:   Wed, 15 Feb 2017 09:59:26 +0100
From:   Peter Senna Tschudin <peter.senna@...il.com>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>
Cc:     gregkh@...uxfoundation.org, oneukum@...e.com, bjorn@...k.no,
        robert.foss@...labora.com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: class: remove logically dead code

On Tue, Feb 14, 2017 at 09:10:52PM -0600, Gustavo A. R. Silva wrote:
> Remove logically dead code.
> 'cntr' is always equal to zero when the following line of code is executed:
> rv = cntr ? cntr : -EAGAIN;
> 
> Addresses-Coverity-ID: 113227
> Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>
Reviewed-by: Peter Senna Tschudin <peter.senna@...il.com>
> ---
>  drivers/usb/class/cdc-wdm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
> index 0a63695..8fda45a 100644
> --- a/drivers/usb/class/cdc-wdm.c
> +++ b/drivers/usb/class/cdc-wdm.c
> @@ -531,7 +531,7 @@ static ssize_t wdm_read
>  		i++;
>  		if (file->f_flags & O_NONBLOCK) {
>  			if (!test_bit(WDM_READ, &desc->flags)) {
> -				rv = cntr ? cntr : -EAGAIN;
> +				rv = -EAGAIN;
>  				goto err;
>  			}
>  			rv = 0;
> -- 
> 2.5.0
> 

Powered by blists - more mailing lists