summaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-02-16 23:27:36 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-16 09:58:44 +0100
commit78f74f75bd80b8d3cc731da91d2065b172c67817 (patch)
treeb7b6bf56be801634be7ca800111d355e0028b0cb /drivers/usb/atm
parentLinux 4.11-rc2 (diff)
downloadlinux-78f74f75bd80b8d3cc731da91d2065b172c67817.tar.xz
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')
-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;