summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2021-08-26 09:49:28 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-09-30 04:27:08 -0400
commit22d7108ce47290d47e1ea83a28fbfc85e0ecf97e (patch)
treef1c3f55a5216a79c1048a032496f0fa7ce66e5a9 /tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c
parentd22869aff4dc8fbbb694c6fe9a4b5db2d570a138 (diff)
downloadlinux-22d7108ce47290d47e1ea83a28fbfc85e0ecf97e.tar.bz2
KVM: selftests: Fix kvm_vm_free() in cr4_cpuid_sync and vmx_tsc_adjust tests
The kvm_vm_free() statement here is currently dead code, since the loop in front of it can only be left with the "goto done" that jumps right after the kvm_vm_free(). Fix it by swapping the locations of the "done" label and the kvm_vm_free(). Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210826074928.240942-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c b/tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c
index 7e33a350b053..e683d0ac3e45 100644
--- a/tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c
+++ b/tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c
@@ -161,7 +161,7 @@ int main(int argc, char *argv[])
}
}
- kvm_vm_free(vm);
done:
+ kvm_vm_free(vm);
return 0;
}