diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-07 12:06:02 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-07 12:06:02 -0400 |
commit | a280e358465b4ac8982dc1eb2deebcb020443b7f (patch) | |
tree | 2e8ea05740008b6b2761e30069aefabb1710ca2d /virt | |
parent | f2906aa863381afb0015a9eb7fefad885d4e5a56 (diff) | |
parent | 11d39e8cc43e1c6737af19ca9372e590061b5ad2 (diff) |
Merge branch 'kvm-5.19-early-fixes' into HEAD
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 64ec2222a196..44c47670447a 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -4300,8 +4300,11 @@ static int kvm_ioctl_create_device(struct kvm *kvm, kvm_put_kvm_no_destroy(kvm); mutex_lock(&kvm->lock); list_del(&dev->vm_node); + if (ops->release) + ops->release(dev); mutex_unlock(&kvm->lock); - ops->destroy(dev); + if (ops->destroy) + ops->destroy(dev); return ret; } |