drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user
Subsystems (3)
PATCH 1/1 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.
--- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +1 -1
@@ -3570,7 +3570,7 @@ int vmw_execbuf_fence_commands(struct drm_file *file_priv, *p_fence =NULL ; } -return 0 ; +return ret; }/**
Signature · 6 lines
2.19.0.rc1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 32 lines · Thomas Hellstrom
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 functionvmw_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 <[email protected]>--- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +1
-1@@ -3570,7 +3570,7 @@ int vmw_execbuf_fence_commands(struct drm_file *file_priv, *p_fence =NULL ; } -return 0 ; +return ret; }
Quoted 1 line
/**
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel