aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-06-21 16:26:46 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 16:34:39 -0700
commit8ccef0df54642f0f72f922d8aa57e8b290e31671 (patch)
tree74562c28bbdfbcb06a2da476230687ce3592a59c /drivers/usb/serial
parentcfa59dab27d1b282886e7772a8f9548236883892 (diff)
USB: Fix off-by-1 error in the scatter-gather library
The loop in usb_sg_wait() is structured in a way that makes it hard to tell, when the loop exits, whether or not the last URB submission succeeded. This patch (as928) changes it from a "for" loop to a "while" loop and keeps "i" always equal to the number of successful submissions. This fixes an off-by-one error which can show up when the first URB submission fails. The patch also removes a couple of lines that initialize fields which don't need to be initialized. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
0 files changed, 0 insertions, 0 deletions