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

usb: misc: remove unnecessary code

'val' is an unsigned variable, and less-than-zero comparison of an unsigned
variable is never true.

Addresses-Coverity-ID: 1230256
Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 78f74f75
...@@ -222,7 +222,7 @@ static ssize_t u1_timeout_store(struct device *dev, ...@@ -222,7 +222,7 @@ static ssize_t u1_timeout_store(struct device *dev,
return ret; return ret;
} }
if (val < 0 || val > 127) if (val > 127)
return -EINVAL; return -EINVAL;
ret = lvs_rh_set_port_feature(hdev, lvs->portnum | (val << 8), ret = lvs_rh_set_port_feature(hdev, lvs->portnum | (val << 8),
......
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