diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-02-16 16:27:36 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-16 17:58:44 +0900 |
commit | 78f74f75bd80b8d3cc731da91d2065b172c67817 (patch) | |
tree | b7b6bf56be801634be7ca800111d355e0028b0cb /drivers/usb/atm | |
parent | 4495c08e84729385774601b5146d51d9e5849f81 (diff) | |
download | linux-78f74f75bd80b8d3cc731da91d2065b172c67817.tar.bz2 |
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.c | 2 |
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; |