From: Miaohe Lin Date: Mon, 21 Oct 2019 02:52:56 +0000 (+0800) Subject: KVM: remove redundant code in kvm_arch_vm_ioctl X-Git-Tag: v5.10.7~3711^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30ce89acdfe91eb7a88cc5805d2774f11e1eccb4;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 368a7664..38131c8 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;