aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-rng-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/virtio/virtio-rng-pci.c')
-rw-r--r--hw/virtio/virtio-rng-pci.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/virtio/virtio-rng-pci.c b/hw/virtio/virtio-rng-pci.c
index cf1afb47a6..2f0b529b62 100644
--- a/hw/virtio/virtio-rng-pci.c
+++ b/hw/virtio/virtio-rng-pci.c
@@ -34,16 +34,12 @@ static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
{
VirtIORngPCI *vrng = VIRTIO_RNG_PCI(vpci_dev);
DeviceState *vdev = DEVICE(&vrng->vdev);
- Error *err = NULL;
- qdev_realize(vdev, BUS(&vpci_dev->bus), &err);
- if (err) {
- error_propagate(errp, err);
+ if (!qdev_realize(vdev, BUS(&vpci_dev->bus), errp)) {
return;
}
- object_property_set_link(OBJECT(vrng),
- OBJECT(vrng->vdev.conf.rng), "rng",
+ object_property_set_link(OBJECT(vrng), "rng", OBJECT(vrng->vdev.conf.rng),
NULL);
}