summaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm/cxacru.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-02-16 16:27:36 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-16 17:58:44 +0900
commit78f74f75bd80b8d3cc731da91d2065b172c67817 (patch)
treeb7b6bf56be801634be7ca800111d355e0028b0cb /drivers/usb/atm/cxacru.c
parent4495c08e84729385774601b5146d51d9e5849f81 (diff)
downloadblackbird-op-linux-78f74f75bd80b8d3cc731da91d2065b172c67817.tar.gz
blackbird-op-linux-78f74f75bd80b8d3cc731da91d2065b172c67817.zip
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@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/atm/cxacru.c')
-rw-r--r--drivers/usb/atm/cxacru.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index f9fe86b6f7b5..d65a64c29b85 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;
OpenPOWER on IntegriCloud