aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/virtio-net.c6
-rw-r--r--hw/virtio-net.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 5eca19cd78..54c0030eb3 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -315,7 +315,7 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)
return 0;
}
-PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
+void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
{
VirtIONet *n;
static int virtio_net_id;
@@ -326,7 +326,7 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
sizeof(struct virtio_net_config),
sizeof(VirtIONet));
if (!n)
- return NULL;
+ return;
n->vdev.get_config = virtio_net_update_config;
n->vdev.get_features = virtio_net_get_features;
@@ -347,6 +347,4 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
register_savevm("virtio-net", virtio_net_id++, 2,
virtio_net_save, virtio_net_load, n);
-
- return (PCIDevice *)n;
}
diff --git a/hw/virtio-net.h b/hw/virtio-net.h
index 9ac9e34ae1..148ec47126 100644
--- a/hw/virtio-net.h
+++ b/hw/virtio-net.h
@@ -80,6 +80,6 @@ struct virtio_net_hdr_mrg_rxbuf
uint16_t num_buffers; /* Number of merged rx buffers */
};
-PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn);
+void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn);
#endif