diff options
author | 2019-10-21 10:52:56 +0800 | |
---|---|---|
committer | 2019-10-22 13:34:52 +0200 | |
commit | 30ce89acdfe91eb7a88cc5805d2774f11e1eccb4 (patch) | |
tree | 8d17c49077b48daedb653fd0c91e9160df16a275 | |
parent | kvm: x86: Modify kvm_x86_ops.get_enable_apicv() to use struct kvm parameter (diff) | |
download | linux-dev-30ce89acdfe91eb7a88cc5805d2774f11e1eccb4.tar.xz linux-dev-30ce89acdfe91eb7a88cc5805d2774f11e1eccb4.zip |
KVM: remove redundant code in kvm_arch_vm_ioctl
If we reach here with r = 0, we will reassign r = 0
unnecesarry, then do the label set_irqchip_out work.
If we reach here with r != 0, then we will do the label
work directly. So this if statement and r = 0 assignment
is redundant.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 368a76648b70..38131c834091 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4910,9 +4910,6 @@ set_identity_unlock: if (!irqchip_kernel(kvm)) goto set_irqchip_out; r = kvm_vm_ioctl_set_irqchip(kvm, chip); - if (r) - goto set_irqchip_out; - r = 0; set_irqchip_out: kfree(chip); break; |