[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170216222736.GA6510@embeddedgus>
Date: Thu, 16 Feb 2017 16:27:36 -0600
From: "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To: gregkh@...uxfoundation.org, wsa-dev@...g-engineering.com
Cc: accessrunner-general@...ts.sourceforge.net,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Peter Senna Tschudin <peter.senna@...il.com>,
"Gustavo A. R. Silva" <garsilva@...eddedor.com>
Subject: [PATCH] usb: atm: remove unnecessary code
'index' is an unsigned variable, and less-than-zero comparison of an unsigned
variable is never true.
Addresses-Coverity-ID: 115396
Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>
---
drivers/usb/atm/cxacru.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index f9fe86b6..d65a64c 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -474,7 +474,7 @@ static ssize_t cxacru_sysfs_store_adsl_config(struct device *dev,
ret = sscanf(buf + pos, "%x=%x%n", &index, &value, &tmp);
if (ret < 2)
return -EINVAL;
- if (index < 0 || index > 0x7f)
+ if (index > 0x7f)
return -EINVAL;
if (tmp < 0 || tmp > len - pos)
return -EINVAL;
--
2.5.0
Powered by blists - more mailing lists