drm/vc4: Return -EFAULT on copy_from_user() failure
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 8 Mar 2016 12:09:41 +0000 (15:09 +0300)
committerEric Anholt <eric@anholt.net>
Mon, 14 Mar 2016 00:09:12 +0000 (17:09 -0700)
commit585cb132a48190b554aecda2ebc3e2911fcbb665
treea06a893368b7acc7f6505f8511cd05a43c398637
parent0b06e0a7945130e6a187f7959529cba7725f573a
drm/vc4: Return -EFAULT on copy_from_user() failure

The copy_from_user() function returns the number of bytes not copied but
we want to return a negative error code.

Fixes: 463873d57014 ('drm/vc4: Add an API for creating GPU shaders in GEM BOs.')
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/vc4/vc4_bo.c