public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Remove redundant code
@ 2018-07-16 12:39 Gustavo A. R. Silva
  2018-07-16 12:47 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-16 12:39 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie
  Cc: intel-gfx, dri-devel, linux-kernel, Gustavo A. R. Silva

err is assigned to -EIO, but this value is never actually
used and *err* is updated later on.

Remove such reduntant code.

Addresses-Coverity-ID: 1471816 ("Unused value")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/gpu/drm/i915/selftests/intel_guc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/intel_guc.c b/drivers/gpu/drm/i915/selftests/intel_guc.c
index 407c98f..c10e75c 100644
--- a/drivers/gpu/drm/i915/selftests/intel_guc.c
+++ b/drivers/gpu/drm/i915/selftests/intel_guc.c
@@ -206,7 +206,6 @@ static int igt_guc_clients(void *args)
 
 	if (!available_dbs(guc, guc->execbuf_client->priority)) {
 		pr_err("doorbell not available when it should\n");
-		err = -EIO;
 		goto out_db;
 	}
 
-- 
2.7.4


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

* Re: [PATCH] drm/i915/selftests: Remove redundant code
  2018-07-16 12:39 [PATCH] drm/i915/selftests: Remove redundant code Gustavo A. R. Silva
@ 2018-07-16 12:47 ` Chris Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2018-07-16 12:47 UTC (permalink / raw)
  To: Gustavo A. R. Silva, David Airlie, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi
  Cc: intel-gfx, dri-devel, linux-kernel, Gustavo A. R. Silva

Quoting Gustavo A. R. Silva (2018-07-16 13:39:33)
> err is assigned to -EIO, but this value is never actually
> used and *err* is updated later on.
> 
> Remove such reduntant code.

The mistake is that err is lost, possible masking the test failure.
Looks like the unwind needs to be refactored?
-Chris

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

end of thread, other threads:[~2018-07-16 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-16 12:39 [PATCH] drm/i915/selftests: Remove redundant code Gustavo A. R. Silva
2018-07-16 12:47 ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox