diff options
author | Gareth Hughes <gareth@users.sourceforge.net> | 2000-09-06 20:56:34 +0000 |
---|---|---|
committer | Gareth Hughes <gareth@users.sourceforge.net> | 2000-09-06 20:56:34 +0000 |
commit | 7db6449142ca24183f50e6f9dcf396b899b4113b (patch) | |
tree | 351a460b510edd1b4236323e98d41892e843593c /linux/dma.c | |
parent | e3e2d66131a3615379fe81ea106d7133da084683 (diff) |
Sync with 2.4.0-test8-pre5 kernel.
Diffstat (limited to 'linux/dma.c')
-rw-r--r-- | linux/dma.c | 14 |
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; |