Skip to content

Commit faf0be2

Browse files
MiaoheLinbonzini
authored andcommitted
KVM: Fix jump label out_free_* in kvm_init()
The jump label out_free_1 and out_free_2 deal with the same stuff, so git rid of one and rename the label out_free_0a to retain the label name order. Signed-off-by: Miaohe Lin <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 24885d1 commit faf0be2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

virt/kvm/kvm_main.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4354,12 +4354,12 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
43544354

43554355
r = kvm_arch_hardware_setup();
43564356
if (r < 0)
4357-
goto out_free_0a;
4357+
goto out_free_1;
43584358

43594359
for_each_online_cpu(cpu) {
43604360
smp_call_function_single(cpu, check_processor_compat, &r, 1);
43614361
if (r < 0)
4362-
goto out_free_1;
4362+
goto out_free_2;
43634363
}
43644364

43654365
r = cpuhp_setup_state_nocalls(CPUHP_AP_KVM_STARTING, "kvm/cpu:starting",
@@ -4416,9 +4416,8 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
44164416
unregister_reboot_notifier(&kvm_reboot_notifier);
44174417
cpuhp_remove_state_nocalls(CPUHP_AP_KVM_STARTING);
44184418
out_free_2:
4419-
out_free_1:
44204419
kvm_arch_hardware_unsetup();
4421-
out_free_0a:
4420+
out_free_1:
44224421
free_cpumask_var(cpus_hardware_enabled);
44234422
out_free_0:
44244423
kvm_irqfd_exit();

0 commit comments

Comments
 (0)