+12
−18
+7
−4
Loading
Now that vfio_put_base_device is called unconditionally at instance_finalize time, it can be called twice if vfio_populate_device fails. This works but it is slightly harder to follow. Change vfio_get_device to not touch the vbasedev struct until it will definitely succeed, moving the vfio_populate_device call back to vfio-pci. This way, vfio_put_base_device will only be called once. Signed-off-by:Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Alex Williamson <alex.williamson@redhat.com>