]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 31 Jan 2019 09:55:37 +0000 (10:55 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Tue, 5 Feb 2019 12:50:53 +0000 (13:50 +0100)
commitb4f18526145b21fe67b85d68159d637c51b70bee
tree9291d5ff7d987dd6973abf147b5b9c14e7ddac3f
parent677e6a65c7b1c22b0a25423e19dafd0a99364ec4
drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user

The function was unconditionally returning 0, and a caller would have to
rely on the returned fence pointer being NULL to detect errors. However,
the function vmw_execbuf_copy_fence_user() would expect a non-zero error
code in that case and would BUG otherwise.

So make sure we return a proper non-zero error code if the fence pointer
returned is NULL.

Cc: <stable@vger.kernel.org>
Fixes: c3d8fbe432eb: ("vmwgfx: Implement fence objects")
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c