linux-kernel-test/drivers/usb/core
Alan Stern 8ccef0df54 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>
2007-07-12 16:34:39 -07:00
..
buffer.c USB: a bit more coding style cleanup 2007-02-07 15:44:40 -08:00
config.c USB: Fix up full-speed bInterval values in high-speed interrupt descriptor 2007-07-12 16:34:37 -07:00
devices.c USB: remove use of the bus rwsem, as it doesn't really protect anything. 2007-04-27 10:57:30 -07:00
devio.c usbfs micro optimitation 2007-04-27 13:28:42 -07:00
driver.c USB: Remove usages of dev->power.power_state 2007-07-12 16:34:39 -07:00
endpoint.c USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR 2007-02-16 15:32:17 -08:00
file.c USB: prevent char device open/deregister race 2007-07-12 16:29:48 -07:00
generic.c USB: unify reset_resume and normal resume 2007-07-12 16:34:30 -07:00
hcd-pci.c USB: remove references to dev.power.power_state 2007-07-12 16:29:46 -07:00
hcd.c USB: Don't resume root hub if the controller is suspended 2007-07-12 16:34:39 -07:00
hcd.h USB: separate root and non-root suspend/resume 2007-07-12 16:34:29 -07:00
hub.c USB: add power/persist device attribute 2007-07-12 16:34:30 -07:00
hub.h USB: Move private hub declarations out of public header file 2006-12-01 14:23:30 -08:00
inode.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
Kconfig USB: add power/persist device attribute 2007-07-12 16:34:30 -07:00
Makefile USB: add a blacklist for devices that can't handle some things we throw at them. 2007-02-23 15:03:46 -08:00
message.c USB: Fix off-by-1 error in the scatter-gather library 2007-07-12 16:34:39 -07:00
notify.c usbfs: private mutex for open, release, and remove 2006-09-27 11:58:49 -07:00
otg_whitelist.h USB: Fix apparent typo CONFIG_USB_CDCETHER. 2007-02-16 15:32:18 -08:00
quirks.c USB: add RESET_RESUME device quirk 2007-07-12 16:29:47 -07:00
sysfs.c USB: add power/persist device attribute 2007-07-12 16:34:30 -07:00
urb.c USB: Add URB_FREE_BUFFER flag and the logic behind it 2007-07-12 16:34:38 -07:00
usb.c USB: replace flush_workqueue with cancel_sync_work 2007-05-29 13:39:07 -07:00
usb.h USB: unify reset_resume and normal resume 2007-07-12 16:34:30 -07:00