]> Git Repo - linux.git/commitdiff
usb: cdc-wdm: remove logically dead code
authorGustavo A. R. Silva <[email protected]>
Wed, 15 Feb 2017 03:10:52 +0000 (21:10 -0600)
committerGreg Kroah-Hartman <[email protected]>
Wed, 15 Feb 2017 18:35:15 +0000 (10:35 -0800)
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 <[email protected]>
Acked-by: Oliver Neukum <[email protected]>
Reviewed-by: Peter Senna Tschudin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/class/cdc-wdm.c

index 0a6369510f2dd52b0908ca874df90653f6c7bfea..8fda45a45bd3713398922f3158f48674153514a6 100644 (file)
@@ -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;
This page took 0.066071 seconds and 4 git commands to generate.