summaryrefslogtreecommitdiff
path: root/linux/drawable.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drawable.c')
-rw-r--r--linux/drawable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drawable.c b/linux/drawable.c
index 03839f5b..1328054e 100644
--- a/linux/drawable.c
+++ b/linux/drawable.c
@@ -39,7 +39,8 @@ int drm_adddraw(struct inode *inode, struct file *filp, unsigned int cmd,
draw.handle = 0; /* NOOP */
DRM_DEBUG("%d\n", draw.handle);
- copy_to_user_ret((drm_draw_t *)arg, &draw, sizeof(draw), -EFAULT);
+ if (copy_to_user((drm_draw_t *)arg, &draw, sizeof(draw)))
+ return -EFAULT;
return 0;
}