From: Rob Clark Date: Fri, 24 Jun 2022 18:45:28 +0000 (-0700) Subject: drm/msm/gem: Fix error return on fence id alloc fail X-Git-Tag: v5.15.73~2607 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68aa6f13dc43fc6e5572e5bdaac0eb24475d15aa;p=platform%2Fkernel%2Flinux-rpi.git drm/msm/gem: Fix error return on fence id alloc fail [ Upstream commit 08de214138cdea438a0dfcb10d355a6650c6017c ] This was a typo, we didn't actually want to return zero. Fixes: a61acbbe9cf8 ("drm/msm: Track "seqno" fences by idr") Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/491145/ Link: https://lore.kernel.org/r/20220624184528.4036837-1-robdclark@gmail.com Signed-off-by: Sasha Levin --- diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 7fb7ff04..1f74bab 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -889,7 +889,7 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data, submit->fence_id = idr_alloc_cyclic(&queue->fence_idr, submit->user_fence, 1, INT_MAX, GFP_KERNEL); if (submit->fence_id < 0) { - ret = submit->fence_id = 0; + ret = submit->fence_id; submit->fence_id = 0; goto out; }