ChangeSet 1.1504.2.7, 2003/12/05 11:07:06-08:00, [EMAIL PROTECTED]

[PATCH] USB storage: Fix logic error in raw_bulk.c:us_copy_to_sgbuf()

This patch fixes a simple logic error in the routine that copies data from
a driver buffer to a scatter-gather user buffer.


 drivers/usb/storage/raw_bulk.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/usb/storage/raw_bulk.c b/drivers/usb/storage/raw_bulk.c
--- a/drivers/usb/storage/raw_bulk.c    Mon Dec 29 14:26:24 2003
+++ b/drivers/usb/storage/raw_bulk.c    Mon Dec 29 14:26:24 2003
@@ -96,7 +96,7 @@
                        length = room;
                
                memcpy(ptr, buffer+transferred, length);
-               transferred += sg[i].length;
+               transferred += length;
                *offset += length;
                if (length == room) {
                        i++;



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to