aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/urb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core/urb.c')
-rw-r--r--drivers/usb/core/urb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 58bc5e3c2560..3376055f36e7 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -295,7 +295,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
295 if (!urb || urb->hcpriv || !urb->complete) 295 if (!urb || urb->hcpriv || !urb->complete)
296 return -EINVAL; 296 return -EINVAL;
297 dev = urb->dev; 297 dev = urb->dev;
298 if ((!dev) || (dev->state < USB_STATE_DEFAULT)) 298 if ((!dev) || (dev->state < USB_STATE_UNAUTHENTICATED))
299 return -ENODEV; 299 return -ENODEV;
300 300
301 /* For now, get the endpoint from the pipe. Eventually drivers 301 /* For now, get the endpoint from the pipe. Eventually drivers
@@ -370,7 +370,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
370 } 370 }
371 371
372 /* the I/O buffer must be mapped/unmapped, except when length=0 */ 372 /* the I/O buffer must be mapped/unmapped, except when length=0 */
373 if (urb->transfer_buffer_length < 0) 373 if (urb->transfer_buffer_length > INT_MAX)
374 return -EMSGSIZE; 374 return -EMSGSIZE;
375 375
376#ifdef DEBUG 376#ifdef DEBUG