summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_syncobj.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2018-11-05 15:01:10 -0800
committerChristian König <christian.koenig@amd.com>2018-11-06 12:53:02 +0100
commitaecbde630e95c02c24182f7acead53ca1c2a60a6 (patch)
tree6feafff357e2bb94b48698cba6e2c15b158e56eb /drivers/gpu/drm/drm_syncobj.c
parenta7f7090f4433dd65a502bbcaf0ee0923071761eb (diff)
drm/syncobj: Fix oops on drm_syncobj_find_fence(file_priv, 0, ...).
This broke rendering on V3D, where we almost always have a 0 in-syncobj. Signed-off-by: Eric Anholt <eric@anholt.net> Fixes: 48197bc564c7 ("drm: add syncobj timeline support v9") Cc: Chunming Zhou <david1.zhou@amd.com> Cc: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.kernel.org/patch/10669317/ Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/drm_syncobj.c')
-rw-r--r--drivers/gpu/drm/drm_syncobj.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 4dca5f7e8c4b..da8175d9c6ff 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -443,7 +443,8 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
int ret;
ret = drm_syncobj_search_fence(syncobj, point, flags, fence);
- drm_syncobj_put(syncobj);
+ if (syncobj)
+ drm_syncobj_put(syncobj);
return ret;
}
EXPORT_SYMBOL(drm_syncobj_find_fence);