From aecbde630e95c02c24182f7acead53ca1c2a60a6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 5 Nov 2018 15:01:10 -0800 Subject: drm/syncobj: Fix oops on drm_syncobj_find_fence(file_priv, 0, ...). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This broke rendering on V3D, where we almost always have a 0 in-syncobj. Signed-off-by: Eric Anholt Fixes: 48197bc564c7 ("drm: add syncobj timeline support v9") Cc: Chunming Zhou Cc: Christian König Reviewed-by: Chunming Zhou Acked-by: Christian König Link: https://patchwork.kernel.org/patch/10669317/ Signed-off-by: Christian König --- drivers/gpu/drm/drm_syncobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/drm/drm_syncobj.c') 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); -- cgit v1.2.3