diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2021-06-01 14:56:54 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2021-06-09 20:27:09 +0000 |
commit | ae2e2bd68a1583c25112507b0885a92a82ebce13 (patch) | |
tree | d3ab09b3489817710dfeefa1ea9693ec5d4faffd | |
parent | 140ce56dcbf21b8619b9b0a9d3433b7f31566dc5 (diff) |
tests/amdgpu: Fix valgrind warning
Struct access after free
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Alex Deucher alexander.deucher@amd.com
-rw-r--r-- | tests/amdgpu/basic_tests.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c index 3a4214f5..0180f9ce 100644 --- a/tests/amdgpu/basic_tests.c +++ b/tests/amdgpu/basic_tests.c @@ -626,13 +626,14 @@ CU_BOOL suite_basic_tests_enable(void) &minor_version, &device_handle)) return CU_FALSE; - if (amdgpu_device_deinitialize(device_handle)) - return CU_FALSE; family_id = device_handle->info.family_id; chip_id = device_handle->info.chip_external_rev; chip_rev = device_handle->info.chip_rev; + if (amdgpu_device_deinitialize(device_handle)) + return CU_FALSE; + /* disable gfx engine basic test cases for some asics have no CPG */ if (asic_is_gfx_pipe_removed(family_id, chip_id, chip_rev)) { if (amdgpu_set_test_active("Basic Tests", |