From 7f071f9a8f746a2a978154635608e6126be18677 Mon Sep 17 00:00:00 2001 From: Christopher Li Date: Mon, 18 Apr 2005 17:39:26 -0700 Subject: [PATCH] --- yaml --- r: 271 b: refs/heads/master c: 668a9541a56af5ebb3ad0babdc2cd73511c9e1e9 h: refs/heads/master i: 269: 4a87189c0bac35e10553de4042ccad05406557a8 267: eb77c390abbcf6e6786c2787f989408a3c212774 263: 3d01283a01016963766f50f69bb0b120e294d49d 255: 6267268b3c711692bad9e5b4474f9a9d570949be v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/devio.c | 40 ++++++++++++++++------------------ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index a37a80df6818..ce678a9551db 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a81e7ecca369afee0b07b4758d8c32542ffc587a +refs/heads/master: 668a9541a56af5ebb3ad0babdc2cd73511c9e1e9 diff --git a/trunk/drivers/usb/core/devio.c b/trunk/drivers/usb/core/devio.c index a047bc392983..923e5185c036 100644 --- a/trunk/drivers/usb/core/devio.c +++ b/trunk/drivers/usb/core/devio.c @@ -1032,15 +1032,15 @@ static int processcompl(struct async *as, void __user * __user *arg) if (put_user(urb->error_count, &userurb->error_count)) return -EFAULT; - if (!(usb_pipeisoc(urb->pipe))) - return 0; - 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; - if (put_user(urb->iso_frame_desc[i].status, - &userurb->iso_frame_desc[i].status)) - return -EFAULT; + if (usb_pipeisoc(urb->pipe)) { + 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; + if (put_user(urb->iso_frame_desc[i].status, + &userurb->iso_frame_desc[i].status)) + return -EFAULT; + } } free_async(as); @@ -1126,7 +1126,7 @@ static int proc_submiturb_compat(struct dev_state *ps, void __user *arg) if (get_urb32(&uurb,(struct usbdevfs_urb32 *)arg)) return -EFAULT; - return proc_do_submiturb(ps, &uurb, ((struct usbdevfs_urb __user *)arg)->iso_frame_desc, arg); + return proc_do_submiturb(ps, &uurb, ((struct usbdevfs_urb32 __user *)arg)->iso_frame_desc, arg); } static int processcompl_compat(struct async *as, void __user * __user *arg) @@ -1146,15 +1146,15 @@ static int processcompl_compat(struct async *as, void __user * __user *arg) if (put_user(urb->error_count, &userurb->error_count)) return -EFAULT; - if (!(usb_pipeisoc(urb->pipe))) - return 0; - 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; - if (put_user(urb->iso_frame_desc[i].status, - &userurb->iso_frame_desc[i].status)) - return -EFAULT; + if (usb_pipeisoc(urb->pipe)) { + 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; + if (put_user(urb->iso_frame_desc[i].status, + &userurb->iso_frame_desc[i].status)) + return -EFAULT; + } } free_async(as); @@ -1177,10 +1177,8 @@ static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg) { struct async *as; - printk("reapurbnblock\n"); if (!(as = async_getcompleted(ps))) return -EAGAIN; - printk("reap got as %p\n", as); return processcompl_compat(as, (void __user * __user *)arg); }