aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/devio.c
diff options
context:
space:
mode:
authorRex Nie <[email protected]>2024-11-12 15:20:22 +0000
committerGreg Kroah-Hartman <[email protected]>2024-11-13 06:06:41 +0000
commitfa518772fb63e201207bcdab7ea108198dc15f3c (patch)
tree51c053accd3bbcc0b5a56198ed6fb018c1edda83 /drivers/usb/core/devio.c
parentusb: typec: fix potential array underflow in ucsi_ccg_sync_control() (diff)
downloadkernel-fa518772fb63e201207bcdab7ea108198dc15f3c.tar.gz
kernel-fa518772fb63e201207bcdab7ea108198dc15f3c.zip
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 <[email protected]> Rule: add Link: https://lore.kernel.org/stable/20241108094255.2133-1-rex.nie%40jaguarmicro.com Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r--drivers/usb/core/devio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 5363468a282f..f6ce6e26e0d4 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -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)