Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338654
b: refs/heads/master
c: 2f02bc8
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Nov 12, 2012
1 parent 42915ff commit d96f80b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2656a9abcf1ec8dd5fee6a75d6997a0f2fa0094e
refs/heads/master: 2f02bc8af3abb846823811af65ec6cc46a4d525d
2 changes: 2 additions & 0 deletions trunk/Documentation/usb/error-codes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Non-USB-specific:

USB-specific:

-EBUSY The URB is already active.

-ENODEV specified USB-device or bus doesn't exist

-ENOENT specified interface or endpoint does not exist or
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/usb/core/urb.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,13 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
struct usb_host_endpoint *ep;
int is_out;

if (!urb || urb->hcpriv || !urb->complete)
if (!urb || !urb->complete)
return -EINVAL;
if (urb->hcpriv) {
WARN_ONCE(1, "URB %p submitted while active\n", urb);
return -EBUSY;
}

dev = urb->dev;
if ((!dev) || (dev->state < USB_STATE_UNAUTHENTICATED))
return -ENODEV;
Expand Down

0 comments on commit d96f80b

Please sign in to comment.