Add a call to mutex_destroy in the error code path as well as in the
virtio_mem_remove code path.
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <
20251123175750.445461-3-mhi@mailbox.org>
out_del_vq:
vdev->config->del_vqs(vdev);
out_free_vm:
+ mutex_destroy(&vm->hotplug_mutex);
kfree(vm);
vdev->priv = NULL;
virtio_reset_device(vdev);
vdev->config->del_vqs(vdev);
+ mutex_destroy(&vm->hotplug_mutex);
kfree(vm);
vdev->priv = NULL;
}