Commit 9f4e9110 authored by Boris Brezillon's avatar Boris Brezillon

drm/panfrost: Make ->run_job() return an ERR_PTR() when appropriate

If the fence creation fail, we can return the error pointer directly.
The core will update the fence error accordingly.
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: default avatarSteven Price <steven.price@arm.com>
Reviewed-by: default avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210630062751.2832545-4-boris.brezillon@collabora.com
parent 78efe21b
......@@ -344,7 +344,7 @@ static struct dma_fence *panfrost_job_run(struct drm_sched_job *sched_job)
fence = panfrost_fence_create(pfdev, slot);
if (IS_ERR(fence))
return NULL;
return fence;
if (job->done_fence)
dma_fence_put(job->done_fence);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment