diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
commit | f1bbbb6912662b9f6070c5bfc4ca9eb1f06a9d5b (patch) | |
tree | c2c130a74be25b0b2dff992e1a195e2728bdaadd /drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | |
parent | fd0961ff67727482bb20ca7e8ea97b83e9de2ddb (diff) | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_resource.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index 7745394c3e63..5f2d5df01e5c 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | |||
@@ -597,8 +597,10 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data, | |||
597 | 597 | ||
598 | ret = copy_from_user(srf->sizes, user_sizes, | 598 | ret = copy_from_user(srf->sizes, user_sizes, |
599 | srf->num_sizes * sizeof(*srf->sizes)); | 599 | srf->num_sizes * sizeof(*srf->sizes)); |
600 | if (unlikely(ret != 0)) | 600 | if (unlikely(ret != 0)) { |
601 | ret = -EFAULT; | ||
601 | goto out_err1; | 602 | goto out_err1; |
603 | } | ||
602 | 604 | ||
603 | if (srf->scanout && | 605 | if (srf->scanout && |
604 | srf->num_sizes == 1 && | 606 | srf->num_sizes == 1 && |
@@ -697,9 +699,11 @@ int vmw_surface_reference_ioctl(struct drm_device *dev, void *data, | |||
697 | if (user_sizes) | 699 | if (user_sizes) |
698 | ret = copy_to_user(user_sizes, srf->sizes, | 700 | ret = copy_to_user(user_sizes, srf->sizes, |
699 | srf->num_sizes * sizeof(*srf->sizes)); | 701 | srf->num_sizes * sizeof(*srf->sizes)); |
700 | if (unlikely(ret != 0)) | 702 | if (unlikely(ret != 0)) { |
701 | DRM_ERROR("copy_to_user failed %p %u\n", | 703 | DRM_ERROR("copy_to_user failed %p %u\n", |
702 | user_sizes, srf->num_sizes); | 704 | user_sizes, srf->num_sizes); |
705 | ret = -EFAULT; | ||
706 | } | ||
703 | out_bad_resource: | 707 | out_bad_resource: |
704 | out_no_reference: | 708 | out_no_reference: |
705 | ttm_base_object_unref(&base); | 709 | ttm_base_object_unref(&base); |