* [patch] drm/ttm: return -EFAULT on copy_to_user error
@ 2010-06-03 9:57 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-06-03 9:57 UTC (permalink / raw)
To: David Airlie
Cc: Thomas Hellstrom, kernel-janitors, dri-devel, Jerome Glisse,
Michel Dänzer, Dave Airlie
copy_to/from_user() returns the number of bytes remaining and this
function normally returns negative error codes. No one uses the
ttm_bo_fbdev_io() function so this change has no impact.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index fe6cb77..fe4a25a 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -444,7 +444,7 @@ ssize_t ttm_bo_fbdev_io(struct ttm_buffer_object *bo, const char __user *wbuf,
ttm_bo_unref(&bo);
if (unlikely(ret != 0))
- return ret;
+ return -EFAULT;
*f_pos += io_size;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch] drm/ttm: return -EFAULT on copy_to_user error
@ 2010-06-03 9:57 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-06-03 9:57 UTC (permalink / raw)
To: David Airlie
Cc: Thomas Hellstrom, kernel-janitors, dri-devel, Jerome Glisse,
Michel Dänzer, Dave Airlie
copy_to/from_user() returns the number of bytes remaining and this
function normally returns negative error codes. No one uses the
ttm_bo_fbdev_io() function so this change has no impact.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index fe6cb77..fe4a25a 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -444,7 +444,7 @@ ssize_t ttm_bo_fbdev_io(struct ttm_buffer_object *bo, const char __user *wbuf,
ttm_bo_unref(&bo);
if (unlikely(ret != 0))
- return ret;
+ return -EFAULT;
*f_pos += io_size;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-03 9:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-03 9:57 [patch] drm/ttm: return -EFAULT on copy_to_user error Dan Carpenter
2010-06-03 9:57 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.