]>
Commit | Line | Data |
---|---|---|
2cab9253 GKH |
1 | From 728354c005c36eaf44b6e5552372b67e60d17f56 Mon Sep 17 00:00:00 2001 |
2 | From: Thomas Hellstrom <thellstrom@vmware.com> | |
3 | Date: Thu, 31 Jan 2019 10:55:37 +0100 | |
4 | Subject: drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user | |
5 | ||
6 | From: Thomas Hellstrom <thellstrom@vmware.com> | |
7 | ||
8 | commit 728354c005c36eaf44b6e5552372b67e60d17f56 upstream. | |
9 | ||
10 | The function was unconditionally returning 0, and a caller would have to | |
11 | rely on the returned fence pointer being NULL to detect errors. However, | |
12 | the function vmw_execbuf_copy_fence_user() would expect a non-zero error | |
13 | code in that case and would BUG otherwise. | |
14 | ||
15 | So make sure we return a proper non-zero error code if the fence pointer | |
16 | returned is NULL. | |
17 | ||
18 | Cc: <stable@vger.kernel.org> | |
19 | Fixes: ae2a104058e2: ("vmwgfx: Implement fence objects") | |
20 | Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> | |
21 | Reviewed-by: Deepak Rawat <drawat@vmware.com> | |
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
23 | ||
24 | --- | |
25 | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- | |
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
27 | ||
28 | --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | |
29 | +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | |
30 | @@ -3843,7 +3843,7 @@ int vmw_execbuf_fence_commands(struct dr | |
31 | *p_fence = NULL; | |
32 | } | |
33 | ||
34 | - return 0; | |
35 | + return ret; | |
36 | } | |
37 | ||
38 | /** |