diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2019-01-31 10:55:37 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-05-02 21:41:39 +0100 |
commit | fa830f1991405cff90c5ad8cdd3cdb74e741b397 (patch) | |
tree | 27f55203262cad7e810ff9c85cf4b0709cf49a2a | |
parent | 17bbfb3a56bba622dd38ccdb60960f28ac13083f (diff) | |
download | linux-stable-fa830f1991405cff90c5ad8cdd3cdb74e741b397.tar.gz linux-stable-fa830f1991405cff90c5ad8cdd3cdb74e741b397.tar.bz2 linux-stable-fa830f1991405cff90c5ad8cdd3cdb74e741b397.zip |
drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user
commit 728354c005c36eaf44b6e5552372b67e60d17f56 upstream.
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.
Fixes: ae2a104058e2: ("vmwgfx: Implement fence objects")
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-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 129751121684..a938e05dba21 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c @@ -2326,7 +2326,7 @@ int vmw_execbuf_fence_commands(struct drm_file *file_priv, *p_fence = NULL; } - return 0; + return ret; } /** |