aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/savage
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/savage')
-rw-r--r--drivers/gpu/drm/savage/savage_bci.c4
-rw-r--r--drivers/gpu/drm/savage/savage_state.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c
index b17d0710871a..6e673fa968e5 100644
--- a/drivers/gpu/drm/savage/savage_bci.c
+++ b/drivers/gpu/drm/savage/savage_bci.c
@@ -990,10 +990,10 @@ static int savage_bci_get_buffers(struct drm_device *dev,
990 990
991 buf->file_priv = file_priv; 991 buf->file_priv = file_priv;
992 992
993 if (DRM_COPY_TO_USER(&d->request_indices[i], 993 if (copy_to_user(&d->request_indices[i],
994 &buf->idx, sizeof(buf->idx))) 994 &buf->idx, sizeof(buf->idx)))
995 return -EFAULT; 995 return -EFAULT;
996 if (DRM_COPY_TO_USER(&d->request_sizes[i], 996 if (copy_to_user(&d->request_sizes[i],
997 &buf->total, sizeof(buf->total))) 997 &buf->total, sizeof(buf->total)))
998 return -EFAULT; 998 return -EFAULT;
999 999
diff --git a/drivers/gpu/drm/savage/savage_state.c b/drivers/gpu/drm/savage/savage_state.c
index b35e75ed890c..2d3e56d94be3 100644
--- a/drivers/gpu/drm/savage/savage_state.c
+++ b/drivers/gpu/drm/savage/savage_state.c
@@ -992,7 +992,7 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
992 if (kcmd_addr == NULL) 992 if (kcmd_addr == NULL)
993 return -ENOMEM; 993 return -ENOMEM;
994 994
995 if (DRM_COPY_FROM_USER(kcmd_addr, cmdbuf->cmd_addr, 995 if (copy_from_user(kcmd_addr, cmdbuf->cmd_addr,
996 cmdbuf->size * 8)) 996 cmdbuf->size * 8))
997 { 997 {
998 kfree(kcmd_addr); 998 kfree(kcmd_addr);
@@ -1007,7 +1007,7 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
1007 goto done; 1007 goto done;
1008 } 1008 }
1009 1009
1010 if (DRM_COPY_FROM_USER(kvb_addr, cmdbuf->vb_addr, 1010 if (copy_from_user(kvb_addr, cmdbuf->vb_addr,
1011 cmdbuf->vb_size)) { 1011 cmdbuf->vb_size)) {
1012 ret = -EFAULT; 1012 ret = -EFAULT;
1013 goto done; 1013 goto done;
@@ -1022,7 +1022,7 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
1022 goto done; 1022 goto done;
1023 } 1023 }
1024 1024
1025 if (DRM_COPY_FROM_USER(kbox_addr, cmdbuf->box_addr, 1025 if (copy_from_user(kbox_addr, cmdbuf->box_addr,
1026 cmdbuf->nbox * sizeof(struct drm_clip_rect))) { 1026 cmdbuf->nbox * sizeof(struct drm_clip_rect))) {
1027 ret = -EFAULT; 1027 ret = -EFAULT;
1028 goto done; 1028 goto done;