diff options
author | Cao jin <caoj.fnst@cn.fujitsu.com> | 2016-01-15 10:23:32 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-02-16 12:05:18 +0200 |
commit | 9cfaa0079f5053683c6a632070244c35fa319549 (patch) | |
tree | 35b102805713f5f9fc679440c42ee21c58e3566c /hw/pci-bridge/pci_bridge_dev.c | |
parent | 33c28f3bde02e6dd69da58f9a8b7e4a50c616849 (diff) |
change type of pci_bridge_initfn() to void
Since it can`t fail. Also modify the callers.
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Diffstat (limited to 'hw/pci-bridge/pci_bridge_dev.c')
-rw-r--r-- | hw/pci-bridge/pci_bridge_dev.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index c9a7e2b2a3..100bb5ebf6 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -53,10 +53,8 @@ static int pci_bridge_dev_initfn(PCIDevice *dev) PCIBridgeDev *bridge_dev = PCI_BRIDGE_DEV(dev); int err; - err = pci_bridge_initfn(dev, TYPE_PCI_BUS); - if (err) { - goto bridge_error; - } + pci_bridge_initfn(dev, TYPE_PCI_BUS); + if (bridge_dev->flags & (1 << PCI_BRIDGE_DEV_F_SHPC_REQ)) { dev->config[PCI_INTERRUPT_PIN] = 0x1; memory_region_init(&bridge_dev->bar, OBJECT(dev), "shpc-bar", @@ -95,7 +93,7 @@ slotid_error: } shpc_error: pci_bridge_exitfn(dev); -bridge_error: + return err; } |