aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/omap3isp/ispqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/omap3isp/ispqueue.c')
-rw-r--r--drivers/media/video/omap3isp/ispqueue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/omap3isp/ispqueue.c b/drivers/media/video/omap3isp/ispqueue.c
index 8fddc5806b0d..9c317148205f 100644
--- a/drivers/media/video/omap3isp/ispqueue.c
+++ b/drivers/media/video/omap3isp/ispqueue.c
@@ -339,7 +339,7 @@ static int isp_video_buffer_prepare_user(struct isp_video_buffer *buf)
339 up_read(&current->mm->mmap_sem); 339 up_read(&current->mm->mmap_sem);
340 340
341 if (ret != buf->npages) { 341 if (ret != buf->npages) {
342 buf->npages = ret; 342 buf->npages = ret < 0 ? 0 : ret;
343 isp_video_buffer_cleanup(buf); 343 isp_video_buffer_cleanup(buf);
344 return -EFAULT; 344 return -EFAULT;
345 } 345 }
@@ -408,8 +408,8 @@ done:
408 * isp_video_buffer_prepare_vm_flags - Get VMA flags for a userspace address 408 * isp_video_buffer_prepare_vm_flags - Get VMA flags for a userspace address
409 * 409 *
410 * This function locates the VMAs for the buffer's userspace address and checks 410 * This function locates the VMAs for the buffer's userspace address and checks
411 * that their flags match. The onlflag that we need to care for at the moment is 411 * that their flags match. The only flag that we need to care for at the moment
412 * VM_PFNMAP. 412 * is VM_PFNMAP.
413 * 413 *
414 * The buffer vm_flags field is set to the first VMA flags. 414 * The buffer vm_flags field is set to the first VMA flags.
415 * 415 *