Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155383
b: refs/heads/master
c: d794a02
h: refs/heads/master
i:
  155381: 2dce3ef
  155379: ef8de34
  155375: 155ef7a
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Jul 12, 2009
1 parent 6b0d644 commit 6b16bb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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: ba516de332c0e574457e58fb5aa0293e628b7b10
refs/heads/master: d794a02111cd3393da69bc7d6dd2b6074bd037cc
16 changes: 10 additions & 6 deletions trunk/drivers/usb/core/devio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,22 +1231,22 @@ static int processcompl(struct async *as, void __user * __user *arg)
if (as->userbuffer)
if (copy_to_user(as->userbuffer, urb->transfer_buffer,
urb->transfer_buffer_length))
return -EFAULT;
goto err_out;
if (put_user(as->status, &userurb->status))
return -EFAULT;
goto err_out;
if (put_user(urb->actual_length, &userurb->actual_length))
return -EFAULT;
goto err_out;
if (put_user(urb->error_count, &userurb->error_count))
return -EFAULT;
goto err_out;

if (usb_endpoint_xfer_isoc(&urb->ep->desc)) {
for (i = 0; i < urb->number_of_packets; i++) {
if (put_user(urb->iso_frame_desc[i].actual_length,
&userurb->iso_frame_desc[i].actual_length))
return -EFAULT;
goto err_out;
if (put_user(urb->iso_frame_desc[i].status,
&userurb->iso_frame_desc[i].status))
return -EFAULT;
goto err_out;
}
}

Expand All @@ -1255,6 +1255,10 @@ static int processcompl(struct async *as, void __user * __user *arg)
if (put_user(addr, (void __user * __user *)arg))
return -EFAULT;
return 0;

err_out:
free_async(as);
return -EFAULT;
}

static struct async *reap_as(struct dev_state *ps)
Expand Down

0 comments on commit 6b16bb9

Please sign in to comment.