diff options
author | Laurent Pinchart <laurent.pinchart@skynet.be> | 2009-02-14 17:39:08 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:42:51 -0400 |
commit | c90e777976f6237a0cdb644c6a9406907939b174 (patch) | |
tree | 7512b145c20e5025618763220078f98f8f3294ab /drivers/media | |
parent | 72362422f3a9cb66e26fa9f0d90d3ef5241e78ba (diff) |
V4L/DVB (10651): uvcvideo: Ignore empty bulk URBs
Devices may send a zero-length packet to signal the end of a bulk payload. If
the payload size is a multiple of the URB size the zero-length packet will be
received by the URB completion handler. Handle this by ignoring all empty URBs.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/uvc/uvc_video.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index 9139086f940a..0789ba381fc1 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c | |||
@@ -540,6 +540,9 @@ static void uvc_video_decode_bulk(struct urb *urb, | |||
540 | u8 *mem; | 540 | u8 *mem; |
541 | int len, ret; | 541 | int len, ret; |
542 | 542 | ||
543 | if (urb->actual_length == 0) | ||
544 | return; | ||
545 | |||
543 | mem = urb->transfer_buffer; | 546 | mem = urb->transfer_buffer; |
544 | len = urb->actual_length; | 547 | len = urb->actual_length; |
545 | video->bulk.payload_size += len; | 548 | video->bulk.payload_size += len; |