From: Gustavo A. R. Silva Date: Wed, 15 Feb 2017 03:10:52 +0000 (-0600) Subject: usb: cdc-wdm: remove logically dead code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=53b7f7b53d83727075c01f57f813fc141d53c3d5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Oliver Neukum Reviewed-by: Peter Senna Tschudin Signed-off-by: Greg Kroah-Hartman --- 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;