From 0ba94b6f94a5b0bed9f125ce4c3348adc83db5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 30 Jul 2013 04:05:02 +0200 Subject: virtio: Complete converting VirtioDevice to QOM realize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop VirtioDeviceClass::init. Signed-off-by: Andreas Färber Signed-off-by: Paolo Bonzini --- hw/virtio/virtio.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'hw/virtio') diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 4070b37..1dba284 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1156,18 +1156,12 @@ static void virtio_device_realize(DeviceState *dev, Error **errp) VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(dev); Error *err = NULL; - assert(vdc->init != NULL || vdc->realize != NULL); if (vdc->realize != NULL) { vdc->realize(dev, &err); if (err != NULL) { error_propagate(errp, err); return; } - } else { - if (vdc->init(vdev) < 0) { - error_setg(errp, "Device initialization failed."); - return; - } } virtio_bus_device_plugged(vdev); } -- cgit v1.1