vfio/pci: Do not unwind on error
commit5b31c8229d903f27b7d6e3aa5c59e660dcc5908b
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 29 Aug 2017 22:05:32 +0000 (29 16:05 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 3 Oct 2017 18:57:35 +0000 (3 12:57 -0600)
tree9aa1a212d810f70632fa3b74573f608e9901208d
parentd147f7e815f97cb477e223586bcb80c316ae10ea
vfio/pci: Do not unwind on error

If vfio_add_std_cap() errors then going to out prepends irrelevant
errors for capabilities we haven't attempted to add as we unwind our
recursive stack.  Just return error.

Fixes: 7ef165b9a8d9 ("vfio/pci: Pass an error object to vfio_add_capabilities")
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/pci.c