All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Fix wrong return value of perf_series_engines()
@ 2020-11-16 14:41 ` Zhang Xiaoxu
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang Xiaoxu @ 2020-11-16 14:41 UTC (permalink / raw)
  To: zhangxiaoxu5, chris, jani.nikula, rodrigo.vivi, mika.kuoppala,
	dri-devel, intel-gfx

If intel context create failed, the perf_series_engines() will return 0
rather than error, because we doesn't initialize the return value.

Fixes: cbfd3a0c5a55 ("drm/i915/selftests: Add request throughput measurement to perf")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
---
 drivers/gpu/drm/i915/selftests/i915_request.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index 6b512fc13ca7..e424a6d1a68c 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -2469,8 +2469,10 @@ static int perf_series_engines(void *arg)
 		struct intel_context *ce;
 
 		ce = intel_context_create(engine);
-		if (IS_ERR(ce))
+		if (IS_ERR(ce)) {
+			err = PTR_ERR(ce);
 			goto out;
+		}
 
 		err = intel_context_pin(ce);
 		if (err) {
-- 
2.25.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-17  8:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 14:41 [PATCH] drm/i915/selftests: Fix wrong return value of perf_series_engines() Zhang Xiaoxu
2020-11-16 14:41 ` [Intel-gfx] " Zhang Xiaoxu
2020-11-16 14:51 ` Mika Kuoppala
2020-11-16 14:51   ` [Intel-gfx] " Mika Kuoppala
2020-11-16 15:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-11-16 21:26 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.