mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 11:56:45 +07:00
7fd4b41f05
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> |
||
---|---|---|
.. | ||
ivtv-cards.c | ||
ivtv-cards.h | ||
ivtv-controls.c | ||
ivtv-controls.h | ||
ivtv-driver.c | ||
ivtv-driver.h | ||
ivtv-fileops.c | ||
ivtv-fileops.h | ||
ivtv-firmware.c | ||
ivtv-firmware.h | ||
ivtv-gpio.c | ||
ivtv-gpio.h | ||
ivtv-i2c.c | ||
ivtv-i2c.h | ||
ivtv-ioctl.c | ||
ivtv-ioctl.h | ||
ivtv-irq.c | ||
ivtv-irq.h | ||
ivtv-mailbox.c | ||
ivtv-mailbox.h | ||
ivtv-queue.c | ||
ivtv-queue.h | ||
ivtv-routing.c | ||
ivtv-routing.h | ||
ivtv-streams.c | ||
ivtv-streams.h | ||
ivtv-udma.c | ||
ivtv-udma.h | ||
ivtv-vbi.c | ||
ivtv-vbi.h | ||
ivtv-version.h | ||
ivtv-yuv.c | ||
ivtv-yuv.h | ||
ivtvfb.c | ||
Kconfig | ||
Makefile |