Commit 78f74f75 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Greg Kroah-Hartman

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: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4495c08e
...@@ -474,7 +474,7 @@ static ssize_t cxacru_sysfs_store_adsl_config(struct device *dev, ...@@ -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); ret = sscanf(buf + pos, "%x=%x%n", &index, &value, &tmp);
if (ret < 2) if (ret < 2)
return -EINVAL; return -EINVAL;
if (index < 0 || index > 0x7f) if (index > 0x7f)
return -EINVAL; return -EINVAL;
if (tmp < 0 || tmp > len - pos) if (tmp < 0 || tmp > len - pos)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment