i915: return -EFAULT if copy_to_user fails
commit9cd74cb5174c58dd7165f8cd10897bd775a9a777
authorDan Carpenter <error27@gmail.com>
Sat, 19 Jun 2010 13:12:51 +0000 (19 15:12 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:18:14 +0000 (20 13:18 -0700)
treebb8f67f25b23f60879429b89a8c523f974de660b
parentf7f040a6b088a9380a640b181687f7c79fface7b
i915: return -EFAULT if copy_to_user fails

commit 9927a403ca8c97798129953fa9cbb5dc259c7cb9 upstream.

copy_to_user returns the number of bytes remaining to be copied, but we
want to return a negative error code here.  These are returned to
userspace.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/i915_dma.c