mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
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>
This commit is contained in:
parent
d4d75128b8
commit
144a3cbe12
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user