aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2011-10-18 02:09:19 -0400
committerDave Airlie <airlied@redhat.com>2011-10-18 05:41:11 -0400
commitd2c184fb10656f2a6d59fef76efb3a8b12fb6ed4 (patch)
treeec6b13518ca0bc7ef4b460d01671ff3c4c3294ac /drivers/gpu/drm/vmwgfx
parentbd8315c4a8ade3c0cd6c1933ae6e453958397d22 (diff)
vmwgfx: return -EFAULT instead of number of bytes remaining
The intent here was to return an error code, but instead the code returns the number of bytes remaining (that weren't copied). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
index 97f23abeacd..3f6343502d1 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
@@ -150,6 +150,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
150 ret = copy_from_user(clips, clips_ptr, num_clips * sizeof(*clips)); 150 ret = copy_from_user(clips, clips_ptr, num_clips * sizeof(*clips));
151 if (ret) { 151 if (ret) {
152 DRM_ERROR("Failed to copy clip rects from userspace.\n"); 152 DRM_ERROR("Failed to copy clip rects from userspace.\n");
153 ret = -EFAULT;
153 goto out_no_copy; 154 goto out_no_copy;
154 } 155 }
155 156
@@ -241,6 +242,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
241 ret = copy_from_user(clips, clips_ptr, num_clips * sizeof(*clips)); 242 ret = copy_from_user(clips, clips_ptr, num_clips * sizeof(*clips));
242 if (ret) { 243 if (ret) {
243 DRM_ERROR("Failed to copy clip rects from userspace.\n"); 244 DRM_ERROR("Failed to copy clip rects from userspace.\n");
245 ret = -EFAULT;
244 goto out_no_copy; 246 goto out_no_copy;
245 } 247 }
246 248