linux-stable/drivers/media
Paul Cassella 7fd4b41f05 [media] ivtv: yuv: handle get_user_pages() -errno returns
get_user_pages() may return -errno, such as -EFAULT.  So don't blindly use
its return value as an offset into dma->map[] for the next get_user_pages()
call.  Since we'll give up and return an error if either fails, don't even
make the second call if the first failed to give us exactly what we were
looking for.

The old code would also call put_page() on as many elements of dma->map[]
as we'd asked for, regardless of how many were valid.

[Andy Walls modified this patch to return -EFAULT instead of -EINVAL
as Paul's observation "I'm not sure -EINVAL is the best return code vs
-EFAULT or -ENOMEM, [...]" was correct.  The return value bubbles up
as a return code for write(), for which the V4L2 API spec indicates
EINVAL is incorrect and EFAULT is correct.]

Signed-off-by: Paul Cassella <fortytwo-ivtv@maneteren.bigw.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
..
common [media] xc5000: add set_config and other 2011-03-21 20:32:19 -03:00
dvb [media] cx88: add support for TeVii S464 PCI card 2011-03-21 20:32:27 -03:00
radio [media] double mutex lock in drivers/media/radio/si470x/radio-si470x- 2011-03-21 20:31:56 -03:00
rc [media] technisat-usb2: added driver for Technisat's USB2.0 DVB-S/S2 receiver 2011-03-21 20:31:33 -03:00
video [media] ivtv: yuv: handle get_user_pages() -errno returns 2011-03-21 20:32:35 -03:00
Kconfig [media] dabusb: Move it to staging to be deprecated 2010-12-29 08:17:15 -02:00
Makefile [media] rename drivers/media/IR to drives/media/rc 2010-12-29 08:16:36 -02:00