diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-02-16 15:25:44 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-16 17:58:44 +0900 |
commit | b7963dac6871563ee0139d9c7f00ae4405133bde (patch) | |
tree | af41c742396ba9020ea0dd40b89bd1e5b8fe292f /drivers/usb/misc | |
parent | 78f74f75bd80b8d3cc731da91d2065b172c67817 (diff) | |
download | linux-b7963dac6871563ee0139d9c7f00ae4405133bde.tar.bz2 |
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: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/lvstest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c index 77176511658f..c7c210421217 100644 --- a/drivers/usb/misc/lvstest.c +++ b/drivers/usb/misc/lvstest.c @@ -222,7 +222,7 @@ static ssize_t u1_timeout_store(struct device *dev, return ret; } - if (val < 0 || val > 127) + if (val > 127) return -EINVAL; ret = lvs_rh_set_port_feature(hdev, lvs->portnum | (val << 8), |