summaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-12-11 13:07:13 +0100
committerIngo Molnar <mingo@kernel.org>2016-12-11 13:07:13 +0100
commit6f38751510073cc054c5dffc3339b22f9385ceed (patch)
treeb7704b2d3388293118a6794f7a858e8891bcec60 /virt/kvm/kvm_main.c
parentf4ec57b632fe15ed7a355099cb96ed4b647416de (diff)
parent045169816b31b10faed984b01c390db1b32ee4c1 (diff)
downloadlinux-6f38751510073cc054c5dffc3339b22f9385ceed.tar.bz2
Merge branch 'linus' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 2f38ce55016f..c55f5d6a7767 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2897,10 +2897,10 @@ static int kvm_ioctl_create_device(struct kvm *kvm,
ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
if (ret < 0) {
- ops->destroy(dev);
mutex_lock(&kvm->lock);
list_del(&dev->vm_node);
mutex_unlock(&kvm->lock);
+ ops->destroy(dev);
return ret;
}