]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/msm/gem: Fix error code msm_parse_deps()
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 17 Feb 2025 07:32:11 +0000 (10:32 +0300)
committerRob Clark <robdclark@chromium.org>
Thu, 27 Feb 2025 20:58:38 +0000 (12:58 -0800)
The SUBMIT_ERROR() macro turns the error code negative.  This extra '-'
operation turns it back to positive EINVAL again.  The error code is
passed to ERR_PTR() and since positive values are not an IS_ERR() it
eventually will lead to an oops.  Delete the '-'.

Fixes: 866e43b945bf ("drm/msm: UAPI error reporting")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/637625/
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/msm_gem_submit.c

index dee470403036849d43d27075585309c4ddff1ed3..3e9aa2cc38ef9952cfd57ae775e548ed70ddcfd8 100644 (file)
@@ -509,7 +509,7 @@ static struct drm_syncobj **msm_parse_deps(struct msm_gem_submit *submit,
                }
 
                if (syncobj_desc.flags & ~MSM_SUBMIT_SYNCOBJ_FLAGS) {
-                       ret = -SUBMIT_ERROR(EINVAL, submit, "invalid syncobj flags: %x", syncobj_desc.flags);
+                       ret = SUBMIT_ERROR(EINVAL, submit, "invalid syncobj flags: %x", syncobj_desc.flags);
                        break;
                }