diff options
author | Tejun Heo <tj@kernel.org> | 2016-09-06 18:35:56 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-09-06 18:35:56 +0200 |
commit | 2536524a91fe5c5a9fddd282fd4e79ee0976aefe (patch) | |
tree | 30eb5b4cd6d9ed4fda69526537d4fac454cbc5e6 /virt/kvm/arm/vgic/vgic-init.c | |
parent | libata: SCT Write Same handle ATA_DFLAG_PIO (diff) | |
parent | Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert... (diff) | |
download | linux-2536524a91fe5c5a9fddd282fd4e79ee0976aefe.tar.xz linux-2536524a91fe5c5a9fddd282fd4e79ee0976aefe.zip |
Merge branch 'master' into for-4.9
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-init.c')
-rw-r--r-- | virt/kvm/arm/vgic/vgic-init.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/virt/kvm/arm/vgic/vgic-init.c b/virt/kvm/arm/vgic/vgic-init.c index fb4b0a79a950..83777c1cbae0 100644 --- a/virt/kvm/arm/vgic/vgic-init.c +++ b/virt/kvm/arm/vgic/vgic-init.c @@ -73,12 +73,8 @@ int kvm_vgic_create(struct kvm *kvm, u32 type) int i, vcpu_lock_idx = -1, ret; struct kvm_vcpu *vcpu; - mutex_lock(&kvm->lock); - - if (irqchip_in_kernel(kvm)) { - ret = -EEXIST; - goto out; - } + if (irqchip_in_kernel(kvm)) + return -EEXIST; /* * This function is also called by the KVM_CREATE_IRQCHIP handler, @@ -87,10 +83,8 @@ int kvm_vgic_create(struct kvm *kvm, u32 type) * the proper checks already. */ if (type == KVM_DEV_TYPE_ARM_VGIC_V2 && - !kvm_vgic_global_state.can_emulate_gicv2) { - ret = -ENODEV; - goto out; - } + !kvm_vgic_global_state.can_emulate_gicv2) + return -ENODEV; /* * Any time a vcpu is run, vcpu_load is called which tries to grab the @@ -138,9 +132,6 @@ out_unlock: vcpu = kvm_get_vcpu(kvm, vcpu_lock_idx); mutex_unlock(&vcpu->mutex); } - -out: - mutex_unlock(&kvm->lock); return ret; } |