diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-03-14 11:01:05 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 11:18:25 +0200 |
commit | a5eaaa1f33e771fa1651a4a7652b8a5f9fa7f6c1 (patch) | |
tree | 0551988c6eb48598b0b056411e77eaee6fce026a /drivers/usb/gadget/uvc_v4l2.c | |
parent | a33bb2120851407b5703343596d5c2181cfc75b4 (diff) | |
download | op-kernel-dev-a5eaaa1f33e771fa1651a4a7652b8a5f9fa7f6c1.zip op-kernel-dev-a5eaaa1f33e771fa1651a4a7652b8a5f9fa7f6c1.tar.gz |
usb: gadget: uvc: use capped length value
"req->length" is a capped version of "data->length".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/uvc_v4l2.c')
-rw-r--r-- | drivers/usb/gadget/uvc_v4l2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/uvc_v4l2.c index a6c728a..bb140dd 100644 --- a/drivers/usb/gadget/uvc_v4l2.c +++ b/drivers/usb/gadget/uvc_v4l2.c @@ -42,7 +42,7 @@ uvc_send_response(struct uvc_device *uvc, struct uvc_request_data *data) req->length = min_t(unsigned int, uvc->event_length, data->length); req->zero = data->length < uvc->event_length; - memcpy(req->buf, data->data, data->length); + memcpy(req->buf, data->data, req->length); return usb_ep_queue(cdev->gadget->ep0, req, GFP_KERNEL); } |