Skip to content

Commit

Permalink
usb: cdc-wdm: remove logically dead code
Browse files Browse the repository at this point in the history
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@embeddedor.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Gustavo A. R. Silva authored and Greg Kroah-Hartman committed Feb 15, 2017
1 parent eff0b85 commit 53b7f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 53b7f7b

Please sign in to comment.