diff options
Diffstat (limited to 'hw/virtio/virtio.c')
-rw-r--r-- | hw/virtio/virtio.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 3b938c8783..a3082d569d 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1165,11 +1165,7 @@ EventNotifier *virtio_queue_get_host_notifier(VirtQueue *vq) void virtio_device_set_child_bus_name(VirtIODevice *vdev, char *bus_name) { g_free(vdev->bus_name); - vdev->bus_name = NULL; - - if (bus_name) { - vdev->bus_name = g_strdup(bus_name); - } + vdev->bus_name = g_strdup(bus_name); } static void virtio_device_realize(DeviceState *dev, Error **errp) |