From: Dan Carpenter Date: Mon, 17 Feb 2025 07:32:11 +0000 (+0300) Subject: drm/msm/gem: Fix error code msm_parse_deps() X-Git-Tag: v6.15-rc1~120^2~11^2~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b305b7cadce835505bd93183a599acb1f800a05;p=thirdparty%2Fkernel%2Flinux.git drm/msm/gem: Fix error code msm_parse_deps() 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 Patchwork: https://patchwork.freedesktop.org/patch/637625/ Signed-off-by: Rob Clark --- diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index dee4704030368..3e9aa2cc38ef9 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -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; }