vmwgfx: return -EFAULT if copy_to_user fails
authorDan Carpenter <error27@gmail.com>
Sat, 10 Jul 2010 14:30:04 +0000 (16:30 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Jul 2010 05:24:11 +0000 (15:24 +1000)
commit4ede00c96632bcf8a21dd69ac0248f4c40b4cd0e
treebe8837d8c3229ed40819aa3eb7f6dd027de6123c
parent772a2f9b488f4d27c314da5eeabde750b9ead41b
vmwgfx: return -EFAULT if copy_to_user fails

copy_to_user() returns the number of bytes remaining to be copied, but
we want to return a negative error code.  This gets copied to user
space.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c