aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-rng.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/virtio/virtio-rng.c')
-rw-r--r--hw/virtio/virtio-rng.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 8d052fb..2886c0c 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -176,7 +176,6 @@ static void virtio_rng_device_realize(DeviceState *dev, Error **errp)
{
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtIORNG *vrng = VIRTIO_RNG(dev);
- Error *local_err = NULL;
if (vrng->conf.period_ms <= 0) {
error_setg(errp, "'period' parameter expects a positive integer");
@@ -195,8 +194,7 @@ static void virtio_rng_device_realize(DeviceState *dev, Error **errp)
Object *default_backend = object_new(TYPE_RNG_BUILTIN);
if (!user_creatable_complete(USER_CREATABLE(default_backend),
- &local_err)) {
- error_propagate(errp, local_err);
+ errp)) {
object_unref(default_backend);
return;
}