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
main
Andrey Grodzovsky 2021-06-01 14:56:54 -04:00 committed by Alex Deucher
parent 140ce56dcb
commit ae2e2bd68a
1 changed files with 3 additions and 2 deletions

View File

@ -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",