summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-02-14 21:10:52 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-15 10:35:15 -0800
commit53b7f7b53d83727075c01f57f813fc141d53c3d5 (patch)
treef11002cf6b7c106456250e722d99225e87593e96 /drivers/usb/class
parenteff0b85efb2bbdf15aee13f2922722a5e61c3a0d (diff)
downloadlinux-53b7f7b53d83727075c01f57f813fc141d53c3d5.tar.bz2
usb: cdc-wdm: remove logically dead code
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>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-wdm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 0a6369510f2d..8fda45a45bd3 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -531,7 +531,7 @@ retry:
i++;
if (file->f_flags & O_NONBLOCK) {
if (!test_bit(WDM_READ, &desc->flags)) {
- rv = cntr ? cntr : -EAGAIN;
+ rv = -EAGAIN;
goto err;
}
rv = 0;