KVM: Remove redundant change of return value
PATCH 1/1 KVM: Remove redundant change of return value
From: Amos Kong <[email protected]>
In the following situation, assign zero to 'r' is redundant, just remove them.
r = foo();
if (r)
goto out;
r = 0;
...
Signed-off-by Amos Kong <[email protected]>
--- arch/x86/kvm/x86.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-)
arch/x86/kvm/x86.c +0 -7
@@ -2477,7 +2477,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp, r =kvm_vcpu_ioctl_set_lapic (vcpu, u.lapic);if (r) goto out; - r =0 ;break ; }case KVM_INTERRUPT : {
@@ -2489,14 +2488,12 @@ long kvm_arch_vcpu_ioctl(struct file *filp, r =kvm_vcpu_ioctl_interrupt (vcpu, &irq);if (r) goto out; - r =0 ;break ; }case KVM_NMI : { r =kvm_vcpu_ioctl_nmi (vcpu);if (r) goto out; - r =0 ;break ; }case KVM_SET_CPUID : {
@@ -3227,7 +3224,6 @@ long kvm_arch_vm_ioctl(struct file *filp, r =kvm_vm_ioctl_set_irqchip (kvm, chip);if (r) goto set_irqchip_out; - r =0 ; set_irqchip_out:kfree (chip);if (r)
@@ -3260,7 +3256,6 @@ long kvm_arch_vm_ioctl(struct file *filp, r =kvm_vm_ioctl_set_pit (kvm, &u.ps);if (r) goto out; - r =0 ;break ; }case KVM_GET_PIT2 : {
@@ -3286,7 +3281,6 @@ long kvm_arch_vm_ioctl(struct file *filp, r =kvm_vm_ioctl_set_pit2 (kvm, &u.ps2);if (r) goto out; - r =0 ;break ; }case KVM_REINJECT_CONTROL : {
@@ -3297,7 +3291,6 @@ long kvm_arch_vm_ioctl(struct file *filp, r =kvm_vm_ioctl_reinject (kvm, &control);if (r) goto out; - r =0 ;break ; }case KVM_XEN_HVM_CONFIG : {
Signature · 1 line
1.7.0.4