[PATCH] tests/drv_hangman: Fix uninitialized tail usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tail needs to be in outer scope as it is used after loop
continuation destroying its scope.

Reported-by: Thomas Wood <thomas.wood@xxxxxxxxx>
Cc: Thomas Wood <thomas.wood@xxxxxxxxx>
Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
---
 tests/drv_hangman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index 6caf910..280f903 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -240,6 +240,7 @@ static void check_error_state(const int gen,
 	size_t line_size = 0;
 	char *ring_name = NULL;
 	bool bb_ok = false, req_ok = false, ringbuf_ok = false;
+	uint32_t tail;
 
 	debug_fd = igt_debugfs_open("i915_error_state", O_RDONLY);
 	igt_assert_lte(0, debug_fd);
@@ -252,7 +253,6 @@ static void check_error_state(const int gen,
 		uint64_t gtt_offset;
 		int req_matched = 0;
 		int requests;
-		uint32_t tail;
 		int ringbuf_matched = 0;
 		int i, items;
 
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux