Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fd1b6bbb authored by Ming Lei's avatar Ming Lei Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (13153): uvcvideo: Fix uvc_alloc_urb_buffers()



This patch sets stream->urb_size as psize*npackets
before calling uvc_alloc_urb_buffers, which may fix
a possible failure of usb_buffer_free in case usb_buffer_alloc
returns NULL. The patch is based on the ideas below:

1,If usb_buffer_alloc can't allocate a buffer sucessfully,
uvc_free_urb_buffers will be called to free the allocated
buffers, and stream->urb_size is required to be passed to
usb_buffer_free;

2,uvc_free_urb_buffers can reset stream->urb_size.

This patch is against linux-v2.6.31-next-20090926.

Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 716fdee1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment