hw/pci-bridge: Make pxb_dev_realize_common() return if it succeeded
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 14 Oct 2024 12:19:02 +0000 (13:19 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 4 Nov 2024 21:03:25 +0000 (16:03 -0500)
commitd4d5212c541f57c339a592bcf1b38bf325940bfd
tree15a9fdef265cd7e11863b75acc9584dcb21c3cf2
parentd1978226c81b0e9b3d6a7779cf92cbfe9f4a10e8
hw/pci-bridge: Make pxb_dev_realize_common() return if it succeeded

For the CXL PXB there is additional code after pxb_dev_realize_common()
is called.  If that realize failed (e.g. due to an out of range numa_node)
we will get a segfault.  Return a bool so the caller can check if the
pxb_dev_realize_common() succeeded or not without having to poke around
in the errp.

Fixes: 4f8db8711cbd ("hw/pxb: Allow creation of a CXL PXB (host bridge)")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20241014121902.2146424-8-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci-bridge/pci_expander_bridge.c