vfio/pci: Move to single error path
authorReinette Chatre <reinette.chatre@intel.com>
Thu, 11 May 2023 15:44:31 +0000 (08:44 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 23 May 2023 21:49:03 +0000 (15:49 -0600)
commit8850336588fbcccdca484b91631819eabaafd915
treeb480e1f36c79984dd1322ebea5dc4bb0989f7297
parentd977e0f7663961368f6442589e52d27484c2f5c2
vfio/pci: Move to single error path

Enabling and disabling of an interrupt involves several steps
that can fail. Cleanup after failure is done when the error
is encountered, resulting in some repetitive code.

Support for dynamic contexts will introduce more steps during
interrupt enabling and disabling.

Transition to centralized exit path in preparation for dynamic
contexts to eliminate duplicate error handling code.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/72dddae8aa710ce522a74130120733af61cffe4d.1683740667.git.reinette.chatre@intel.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci_intrs.c