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>
This commit is contained in:
Gustavo A. R. Silva 2017-02-16 16:27:36 -06:00 committed by Greg Kroah-Hartman
parent 4495c08e84
commit 78f74f75bd

View file

@ -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;