aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorGuo Chao <yan@linux.vnet.ibm.com>2012-11-02 06:33:23 -0400
committerMarcelo Tosatti <mtosatti@redhat.com>2012-11-13 19:14:29 -0500
commit807f12e57c9783458b8c07f63eff3c3e1df8ab5d (patch)
tree7560f5d4fb19bf4637b59f926eda4512232a921e /arch/x86/kvm
parent951179ce86f5599e2dfb9de254056e91bd865f15 (diff)
KVM: remove unnecessary return value check
No need to check return value before breaking switch. Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/x86.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index a25b3df8e3e1..c31f75dd24d4 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2696,9 +2696,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
2696 return PTR_ERR(u.lapic); 2696 return PTR_ERR(u.lapic);
2697 2697
2698 r = kvm_vcpu_ioctl_set_lapic(vcpu, u.lapic); 2698 r = kvm_vcpu_ioctl_set_lapic(vcpu, u.lapic);
2699 if (r)
2700 goto out;
2701 r = 0;
2702 break; 2699 break;
2703 } 2700 }
2704 case KVM_INTERRUPT: { 2701 case KVM_INTERRUPT: {
@@ -2708,16 +2705,10 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
2708 if (copy_from_user(&irq, argp, sizeof irq)) 2705 if (copy_from_user(&irq, argp, sizeof irq))
2709 goto out; 2706 goto out;
2710 r = kvm_vcpu_ioctl_interrupt(vcpu, &irq); 2707 r = kvm_vcpu_ioctl_interrupt(vcpu, &irq);
2711 if (r)
2712 goto out;
2713 r = 0;
2714 break; 2708 break;
2715 } 2709 }
2716 case KVM_NMI: { 2710 case KVM_NMI: {
2717 r = kvm_vcpu_ioctl_nmi(vcpu); 2711 r = kvm_vcpu_ioctl_nmi(vcpu);
2718 if (r)
2719 goto out;
2720 r = 0;
2721 break; 2712 break;
2722 } 2713 }
2723 case KVM_SET_CPUID: { 2714 case KVM_SET_CPUID: {
@@ -2728,8 +2719,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
2728 if (copy_from_user(&cpuid, cpuid_arg, sizeof cpuid)) 2719 if (copy_from_user(&cpuid, cpuid_arg, sizeof cpuid))
2729 goto out; 2720 goto out;
2730 r = kvm_vcpu_ioctl_set_cpuid(vcpu, &cpuid, cpuid_arg->entries); 2721 r = kvm_vcpu_ioctl_set_cpuid(vcpu, &cpuid, cpuid_arg->entries);
2731 if (r)
2732 goto out;
2733 break; 2722 break;
2734 } 2723 }
2735 case KVM_SET_CPUID2: { 2724 case KVM_SET_CPUID2: {
@@ -2741,8 +2730,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
2741 goto out; 2730 goto out;
2742 r = kvm_vcpu_ioctl_set_cpuid2(vcpu, &cpuid, 2731 r = kvm_vcpu_ioctl_set_cpuid2(vcpu, &cpuid,
2743 cpuid_arg->entries); 2732 cpuid_arg->entries);
2744 if (r)
2745 goto out;
2746 break; 2733 break;
2747 } 2734 }
2748 case KVM_GET_CPUID2: { 2735 case KVM_GET_CPUID2: {
@@ -3207,8 +3194,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
3207 switch (ioctl) { 3194 switch (ioctl) {
3208 case KVM_SET_TSS_ADDR: 3195 case KVM_SET_TSS_ADDR:
3209 r = kvm_vm_ioctl_set_tss_addr(kvm, arg); 3196 r = kvm_vm_ioctl_set_tss_addr(kvm, arg);
3210 if (r < 0)
3211 goto out;
3212 break; 3197 break;
3213 case KVM_SET_IDENTITY_MAP_ADDR: { 3198 case KVM_SET_IDENTITY_MAP_ADDR: {
3214 u64 ident_addr; 3199 u64 ident_addr;
@@ -3217,14 +3202,10 @@ long kvm_arch_vm_ioctl(struct file *filp,
3217 if (copy_from_user(&ident_addr, argp, sizeof ident_addr)) 3202 if (copy_from_user(&ident_addr, argp, sizeof ident_addr))
3218 goto out; 3203 goto out;
3219 r = kvm_vm_ioctl_set_identity_map_addr(kvm, ident_addr); 3204 r = kvm_vm_ioctl_set_identity_map_addr(kvm, ident_addr);
3220 if (r < 0)
3221 goto out;
3222 break; 3205 break;
3223 } 3206 }
3224 case KVM_SET_NR_MMU_PAGES: 3207 case KVM_SET_NR_MMU_PAGES:
3225 r = kvm_vm_ioctl_set_nr_mmu_pages(kvm, arg); 3208 r = kvm_vm_ioctl_set_nr_mmu_pages(kvm, arg);
3226 if (r)
3227 goto out;
3228 break; 3209 break;
3229 case KVM_GET_NR_MMU_PAGES: 3210 case KVM_GET_NR_MMU_PAGES:
3230 r = kvm_vm_ioctl_get_nr_mmu_pages(kvm); 3211 r = kvm_vm_ioctl_get_nr_mmu_pages(kvm);
@@ -3315,8 +3296,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
3315 r = 0; 3296 r = 0;
3316 get_irqchip_out: 3297 get_irqchip_out:
3317 kfree(chip); 3298 kfree(chip);
3318 if (r)
3319 goto out;
3320 break; 3299 break;
3321 } 3300 }
3322 case KVM_SET_IRQCHIP: { 3301 case KVM_SET_IRQCHIP: {
@@ -3338,8 +3317,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
3338 r = 0; 3317 r = 0;
3339 set_irqchip_out: 3318 set_irqchip_out:
3340 kfree(chip); 3319 kfree(chip);
3341 if (r)
3342 goto out;
3343 break; 3320 break;
3344 } 3321 }
3345 case KVM_GET_PIT: { 3322 case KVM_GET_PIT: {
@@ -3366,9 +3343,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
3366 if (!kvm->arch.vpit) 3343 if (!kvm->arch.vpit)
3367 goto out; 3344 goto out;
3368 r = kvm_vm_ioctl_set_pit(kvm, &u.ps); 3345 r = kvm_vm_ioctl_set_pit(kvm, &u.ps);
3369 if (r)
3370 goto out;
3371 r = 0;
3372 break; 3346 break;
3373 } 3347 }
3374 case KVM_GET_PIT2: { 3348 case KVM_GET_PIT2: {
@@ -3392,9 +3366,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
3392 if (!kvm->arch.vpit) 3366 if (!kvm->arch.vpit)
3393 goto out; 3367 goto out;
3394 r = kvm_vm_ioctl_set_pit2(kvm, &u.ps2); 3368 r = kvm_vm_ioctl_set_pit2(kvm, &u.ps2);
3395 if (r)
3396 goto out;
3397 r = 0;
3398 break; 3369 break;
3399 } 3370 }
3400 case KVM_REINJECT_CONTROL: { 3371 case KVM_REINJECT_CONTROL: {
@@ -3403,9 +3374,6 @@ long kvm_arch_vm_ioctl(struct file *filp,
3403 if (copy_from_user(&control, argp, sizeof(control))) 3374 if (copy_from_user(&control, argp, sizeof(control)))
3404 goto out; 3375 goto out;
3405 r = kvm_vm_ioctl_reinject(kvm, &control); 3376 r = kvm_vm_ioctl_reinject(kvm, &control);
3406 if (r)
3407 goto out;
3408 r = 0;
3409 break; 3377 break;
3410 } 3378 }
3411 case KVM_XEN_HVM_CONFIG: { 3379 case KVM_XEN_HVM_CONFIG: {