mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-05 05:59:10 +08:00
USB: core: remove dead code in do_proc_bulk()
Since len1 is unsigned int, len1 < 0 always false. Remove it keep code simple. Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com> Rule: add Link: https://lore.kernel.org/stable/20241108094255.2133-1-rex.nie%40jaguarmicro.com Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20241112152021.2236-1-rex.nie@jaguarmicro.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e56aac6e5a
commit
fa518772fb
@@ -1298,7 +1298,7 @@ static int do_proc_bulk(struct usb_dev_state *ps,
|
||||
return ret;
|
||||
|
||||
len1 = bulk->len;
|
||||
if (len1 < 0 || len1 >= (INT_MAX - sizeof(struct urb)))
|
||||
if (len1 >= (INT_MAX - sizeof(struct urb)))
|
||||
return -EINVAL;
|
||||
|
||||
if (bulk->ep & USB_DIR_IN)
|
||||
|
||||
Reference in New Issue
Block a user