Confirm! The bug do exist.

On Fri, May 27, 2011 at 8:09 PM, yingchun li <[email protected]> wrote:
> Hi, All
>     In the function adb_read(f_adb.c), if the transfer succeed, the
> return result is always the length
> set by read system call, e.g. if you read with length 512, actually
> read maybe 200, but the return length is always 512.
> following is the patch:
>
> --- a/drivers/usb/gadget/f_adb.c
> +++ b/drivers/usb/gadget/f_adb.c
> @@ -331,6 +331,7 @@ requeue_req:
>
>                DBG(cdev, "rx %p %d\n", req, req->actual);
>                xfer = (req->actual < count) ? req->actual : count;
> +               r = xfer;
>                if (copy_to_user(buf, req->buf, xfer))
>                        r = -EFAULT;
>        } else
>
> --
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-kernel



-- 

biAji

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel

Reply via email to