diff options
| author | Thomas Hellstrom <thellstrom@vmware.com> | 2019-01-31 04:55:37 -0500 |
|---|---|---|
| committer | Thomas Hellstrom <thellstrom@vmware.com> | 2019-02-05 07:50:53 -0500 |
| commit | 728354c005c36eaf44b6e5552372b67e60d17f56 (patch) | |
| tree | 9291d5ff7d987dd6973abf147b5b9c14e7ddac3f | |
| parent | 05f9467e70ed7c9cd19fd3d42346941cdc03eef3 (diff) | |
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: ae2a104058e2: ("vmwgfx: Implement fence objects")
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index f2d13a72c05d..88b8178d4687 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | |||
| @@ -3570,7 +3570,7 @@ int vmw_execbuf_fence_commands(struct drm_file *file_priv, | |||
| 3570 | *p_fence = NULL; | 3570 | *p_fence = NULL; |
| 3571 | } | 3571 | } |
| 3572 | 3572 | ||
| 3573 | return 0; | 3573 | return ret; |
| 3574 | } | 3574 | } |
| 3575 | 3575 | ||
| 3576 | /** | 3576 | /** |
