[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220620115953.1875309-1-zys.zljxml@gmail.com>
Date: Mon, 20 Jun 2022 19:59:53 +0800
From: zys.zljxml@...il.com
To: dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
jani.nikula@...ux.intel.com, joonas.lahtinen@...ux.intel.com,
rodrigo.vivi@...el.com, tvrtko.ursulin@...ux.intel.com,
airlied@...ux.ie, daniel@...ll.ch
Cc: bob.beckett@...labora.com, matthew.auld@...el.com,
thomas.hellstrom@...ux.intel.com, kernel@...labora.com,
linux-kernel@...r.kernel.org, katrinzhou <katrinzhou@...cent.com>,
Tvrtko Ursulin <tvrtko.ursulin@...el.com>
Subject: [PATCH v2] drm/i915/gem: add missing else
From: katrinzhou <katrinzhou@...cent.com>
Add missing else in set_proto_ctx_param() to fix coverity issue.
Addresses-Coverity: ("Unused value")
Fixes: d4433c7600f7 ("drm/i915/gem: Use the proto-context to handle create parameters (v5)")
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@...el.com>
Signed-off-by: katrinzhou <katrinzhou@...cent.com>
---
Update from v1:
Fixed the code logic as suggested by Tvrtko Ursulin.
drivers/gpu/drm/i915/gem/i915_gem_context.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index ab4c5ab28e4d..1099a383e55a 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -933,7 +933,8 @@ static int set_proto_ctx_param(struct drm_i915_file_private *fpriv,
case I915_CONTEXT_PARAM_PERSISTENCE:
if (args->size)
ret = -EINVAL;
- ret = proto_context_set_persistence(fpriv->dev_priv, pc,
+ else
+ ret = proto_context_set_persistence(fpriv->dev_priv, pc,
args->value);
break;
--
2.27.0
Powered by blists - more mailing lists