[PATCH] drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user
Deepak Singh Rawat
drawat at vmware.com
Fri Feb 1 02:03:57 UTC 2019
Reviewed-by: Deepak Rawat <drawat at vmware.com>
On Thu, 2019-01-31 at 11:07 +0100, Thomas Hellstrom wrote:
> 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 at vmware.com>
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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,
> *p_fence = NULL;
> }
>
> - return 0;
> + return ret;
> }
>
> /**
More information about the dri-devel
mailing list