|
@@ -1152,10 +1152,8 @@ long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl,
|
|
|
{
|
|
|
struct kvm_mips_interrupt irq;
|
|
|
|
|
|
- r = -EFAULT;
|
|
|
if (copy_from_user(&irq, argp, sizeof(irq)))
|
|
|
- goto out;
|
|
|
-
|
|
|
+ return -EFAULT;
|
|
|
kvm_debug("[%d] %s: irq: %d\n", vcpu->vcpu_id, __func__,
|
|
|
irq.irq);
|
|
|
|
|
@@ -1165,17 +1163,14 @@ long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl,
|
|
|
case KVM_ENABLE_CAP: {
|
|
|
struct kvm_enable_cap cap;
|
|
|
|
|
|
- r = -EFAULT;
|
|
|
if (copy_from_user(&cap, argp, sizeof(cap)))
|
|
|
- goto out;
|
|
|
+ return -EFAULT;
|
|
|
r = kvm_vcpu_ioctl_enable_cap(vcpu, &cap);
|
|
|
break;
|
|
|
}
|
|
|
default:
|
|
|
r = -ENOIOCTLCMD;
|
|
|
}
|
|
|
-
|
|
|
-out:
|
|
|
return r;
|
|
|
}
|
|
|
|