Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rex Nie and committed by
Greg Kroah-Hartman
fa518772 e56aac6e

+1 -1
+1 -1
drivers/usb/core/devio.c
··· 1298 1298 return ret; 1299 1299 1300 1300 len1 = bulk->len; 1301 - if (len1 < 0 || len1 >= (INT_MAX - sizeof(struct urb))) 1301 + if (len1 >= (INT_MAX - sizeof(struct urb))) 1302 1302 return -EINVAL; 1303 1303 1304 1304 if (bulk->ep & USB_DIR_IN)