[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170215031052.GA5519@embeddedgus>
Date: Tue, 14 Feb 2017 21:10:52 -0600
From: "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To: gregkh@...uxfoundation.org, oneukum@...e.com, bjorn@...k.no,
robert.foss@...labora.com
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <garsilva@...eddedor.com>,
Peter Senna Tschudin <peter.senna@...il.com>
Subject: [PATCH] usb: class: 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@...eddedor.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