From f90c2bcdbc69e41e575f868b984c3e2de8f51bac Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Tue, 3 Jul 2012 22:39:27 -0600 Subject: pci: convert PCIUnregisterFunc to void Not a single driver has any possibility of failure on their exit function, let's keep it that way. Signed-off-by: Alex Williamson Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'hw/pci.c') diff --git a/hw/pci.c b/hw/pci.c index d5c664c..f783362 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -837,12 +837,10 @@ static int pci_unregister_device(DeviceState *dev) { PCIDevice *pci_dev = PCI_DEVICE(dev); PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(pci_dev); - int ret = 0; - if (pc->exit) - ret = pc->exit(pci_dev); - if (ret) - return ret; + if (pc->exit) { + pc->exit(pci_dev); + } pci_unregister_io_regions(pci_dev); pci_del_option_rom(pci_dev); -- cgit v1.1