aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-10 07:31:59 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-15 22:05:08 +0200
commitdf70796916ebbafe262a01c1c4dc6d7af805de24 (patch)
tree67c5b6e80f36502d9e653f4ae826b9304d1d95de /hw/s390x
parent3e80f6902c13f6edb6675c0f33edcbbf0163ec32 (diff)
qdev: Convert uses of qdev_create() manually
Same transformation as in the previous commit. Manual, because convincing Coccinelle to transform these cases is somewhere between not worthwhile and infeasible (at least for me). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200610053247.1583243-11-armbru@redhat.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/s390-pci-bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 7a4bfb7383..a13978bb37 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -824,7 +824,7 @@ static S390PCIBusDevice *s390_pci_device_new(S390pciState *s,
Error *local_err = NULL;
DeviceState *dev;
- dev = qdev_try_create(BUS(s->bus), TYPE_S390_PCI_DEVICE);
+ dev = qdev_try_new(TYPE_S390_PCI_DEVICE);
if (!dev) {
error_setg(errp, "zPCI device could not be created");
return NULL;
@@ -837,7 +837,7 @@ static S390PCIBusDevice *s390_pci_device_new(S390pciState *s,
"zPCI device could not be created: ");
return NULL;
}
- object_property_set_bool(OBJECT(dev), true, "realized", &local_err);
+ qdev_realize_and_unref(dev, BUS(s->bus), &local_err);
if (local_err) {
object_unparent(OBJECT(dev));
error_propagate_prepend(errp, local_err,