From: Gustavo A. R. Silva Date: Thu, 16 Feb 2017 21:25:44 +0000 (-0600) Subject: usb: misc: remove unnecessary code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b7963dac6871563ee0139d9c7f00ae4405133bde;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- 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),