Re: [Intel-gfx] [PATCH 1/6] drm/i915/selftests: Set error returns

2021-01-04 Thread Andi Shyti
Hi Chris,

On Mon, Jan 04, 2021 at 11:51:40AM +, Chris Wilson wrote:
> A few missed PTR_ERR() upon create_gang() errors.
> 
> Signed-off-by: Chris Wilson 

Reviewed-by: Andi Shyti 

Thanks,
Andi
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 1/6] drm/i915/selftests: Set error returns

2021-01-04 Thread Chris Wilson
A few missed PTR_ERR() upon create_gang() errors.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/gt/selftest_execlists.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_execlists.c 
b/drivers/gpu/drm/i915/gt/selftest_execlists.c
index 080b63000a4e..3854da5a4e65 100644
--- a/drivers/gpu/drm/i915/gt/selftest_execlists.c
+++ b/drivers/gpu/drm/i915/gt/selftest_execlists.c
@@ -2658,8 +2658,10 @@ static int create_gang(struct intel_engine_cs *engine,
goto err_obj;
 
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;
+   }
 
/* Semaphore target: spin until zero */
*cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
@@ -2686,8 +2688,10 @@ static int create_gang(struct intel_engine_cs *engine,
i915_gem_object_unpin_map(obj);
 
rq = intel_context_create_request(ce);
-   if (IS_ERR(rq))
+   if (IS_ERR(rq)) {
+   err = PTR_ERR(rq);
goto err_obj;
+   }
 
rq->batch = i915_vma_get(vma);
i915_request_get(rq);
-- 
2.20.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx