summaryrefslogtreecommitdiff
path: root/linux/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/dma.c')
-rw-r--r--linux/dma.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/linux/dma.c b/linux/dma.c
index ac2d1bc5..62340170 100644
--- a/linux/dma.c
+++ b/linux/dma.c
@@ -486,14 +486,16 @@ static int drm_dma_get_buffers_of_order(drm_device_t *dev, drm_dma_t *d,
buf->pending);
}
buf->pid = current->pid;
- copy_to_user_ret(&d->request_indices[i],
+ if (copy_to_user(&d->request_indices[i],
&buf->idx,
- sizeof(buf->idx),
- -EFAULT);
- copy_to_user_ret(&d->request_sizes[i],
+ sizeof(buf->idx)))
+ return -EFAULT;
+
+ if (copy_to_user(&d->request_sizes[i],
&buf->total,
- sizeof(buf->total),
- -EFAULT);
+ sizeof(buf->total)))
+ return -EFAULT;
+
++d->granted_count;
}
return 0;