Commit 6895649b authored by Chris Wilson's avatar Chris Wilson

drm/i915/selftests: Set error returns

A few missed PTR_ERR() upon create_gang() errors.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarAndi Shyti <andi.shyti@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210104115145.24460-1-chris@chris-wilson.co.uk
parent bf3997a5
...@@ -2658,8 +2658,10 @@ static int create_gang(struct intel_engine_cs *engine, ...@@ -2658,8 +2658,10 @@ static int create_gang(struct intel_engine_cs *engine,
goto err_obj; goto err_obj;
cs = i915_gem_object_pin_map(obj, I915_MAP_WC); cs = i915_gem_object_pin_map(obj, I915_MAP_WC);
if (IS_ERR(cs)) if (IS_ERR(cs)) {
err = PTR_ERR(cs);
goto err_obj; goto err_obj;
}
/* Semaphore target: spin until zero */ /* Semaphore target: spin until zero */
*cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE; *cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
...@@ -2686,8 +2688,10 @@ static int create_gang(struct intel_engine_cs *engine, ...@@ -2686,8 +2688,10 @@ static int create_gang(struct intel_engine_cs *engine,
i915_gem_object_unpin_map(obj); i915_gem_object_unpin_map(obj);
rq = intel_context_create_request(ce); rq = intel_context_create_request(ce);
if (IS_ERR(rq)) if (IS_ERR(rq)) {
err = PTR_ERR(rq);
goto err_obj; goto err_obj;
}
rq->batch = i915_vma_get(vma); rq->batch = i915_vma_get(vma);
i915_request_get(rq); i915_request_get(rq);
......
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