summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorStefan Hajnoczi2022-11-11 17:44:28 +0100
committerStefan Hajnoczi2022-11-11 17:44:28 +0100
commitb58717063c6093031336ab87d50a69adeb040f87 (patch)
tree57f4b9e04b84c025285d4279c7c1f87bd5981161 /hw
parentMerge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu ... (diff)
parenthw/pci-host/pnv_phb: Avoid quitting QEMU if hotplug of pnv-phb-root-port fails (diff)
downloadqemu-b58717063c6093031336ab87d50a69adeb040f87.tar.gz
qemu-b58717063c6093031336ab87d50a69adeb040f87.tar.xz
qemu-b58717063c6093031336ab87d50a69adeb040f87.zip
Merge tag 'pull-ppc-20221111' of https://gitlab.com/danielhb/qemu into staging
ppc patch queue for 2022-11-11: Short queue with just a single pnv-phb fix from Thomas Huth. # -----BEGIN PGP SIGNATURE----- # # iHUEABYKAB0WIQQX6/+ZI9AYAK8oOBk82cqW3gMxZAUCY24dtwAKCRA82cqW3gMx # ZNlDAQC+yqONSkYvoANSPNDuMtcK0Lk7KNXFTx5cg8ASNym0twEAkA/YuNv4t0m2 # 9IRfh/xJ+AhKf6VYKbUwftAsZGPTpAc= # =U0me # -----END PGP SIGNATURE----- # gpg: Signature made Fri 11 Nov 2022 05:02:31 EST # gpg: using EDDSA key 17EBFF9923D01800AF2838193CD9CA96DE033164 # gpg: Good signature from "Daniel Henrique Barboza <danielhb413@gmail.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 17EB FF99 23D0 1800 AF28 3819 3CD9 CA96 DE03 3164 * tag 'pull-ppc-20221111' of https://gitlab.com/danielhb/qemu: hw/pci-host/pnv_phb: Avoid quitting QEMU if hotplug of pnv-phb-root-port fails Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci-host/pnv_phb.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/pci-host/pnv_phb.c b/hw/pci-host/pnv_phb.c
index 7b11f1e8dd..0b26b43736 100644
--- a/hw/pci-host/pnv_phb.c
+++ b/hw/pci-host/pnv_phb.c
@@ -241,8 +241,16 @@ static void pnv_phb_root_port_realize(DeviceState *dev, Error **errp)
* QOM id. 'chip_id' is going to be used as PCIE chassis for the
* root port.
*/
- chip_id = object_property_get_int(OBJECT(bus), "chip-id", &error_fatal);
- index = object_property_get_int(OBJECT(bus), "phb-id", &error_fatal);
+ chip_id = object_property_get_int(OBJECT(bus), "chip-id", &local_err);
+ if (local_err) {
+ error_propagate(errp, local_err);
+ return;
+ }
+ index = object_property_get_int(OBJECT(bus), "phb-id", &local_err);
+ if (local_err) {
+ error_propagate(errp, local_err);
+ return;
+ }
/* Set unique chassis/slot values for the root port */
qdev_prop_set_uint8(dev, "chassis", chip_id);