linux/drivers/media
Ming Lei fd1b6bbb4a 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: Ming Lei <tom.leiming@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:36 -02:00
..
common V4L/DVB (13135): Add support for TeVii remotes 2009-12-05 18:40:29 -02:00
dvb V4L/DVB (13105): dvb-usb: add fe_ioctl_override callback to dvb_usb_adapter_properties 2009-12-05 18:40:22 -02:00
radio V4L/DVB (13073): radio-mr800: set radio frequency only upon success 2009-12-05 18:40:12 -02:00
video V4L/DVB (13153): uvcvideo: Fix uvc_alloc_urb_buffers() 2009-12-05 18:40:36 -02:00
Kconfig V4L/DVB (11881): one kconfig controls them all 2009-06-16 18:21:16 -03:00
Makefile V4L/DVB (8274): sms1xxx: build cleanup after driver relocation 2008-07-20 07:20:56 -03:00