summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-02-20 17:28:46 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-17 13:24:49 +0900
commit144a3cbe12ecabc0c11f8a0f2c5d878fe4fa6392 (patch)
treeb8a25ecf89220cd4849febc9ce7c4af51f9e75e3 /drivers/usb/misc
parentd4d75128b8fd727d42c775a16b41634d09409dba (diff)
downloadlinux-144a3cbe12ecabc0c11f8a0f2c5d878fe4fa6392.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: 1230257 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/lvstest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c
index b7fc978724de..c731a75f28ee 100644
--- a/drivers/usb/misc/lvstest.c
+++ b/drivers/usb/misc/lvstest.c
@@ -193,7 +193,7 @@ static ssize_t u2_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),