summaryrefslogtreecommitdiffstats
path: root/hw/net/virtio-net.c
diff options
context:
space:
mode:
authorJason Wang2015-07-27 11:49:19 +0200
committerMichael S. Tsirkin2015-07-27 17:11:53 +0200
commit9d5b731dd2d64deb3bc798ef4e3c08603d54ae02 (patch)
treef48bb5d3ac1a11ab88e4fe3255f80b3398cc4ae2 /hw/net/virtio-net.c
parentvirtio-pci: fix memory MR cleanup for modern (diff)
downloadqemu-9d5b731dd2d64deb3bc798ef4e3c08603d54ae02.tar.gz
qemu-9d5b731dd2d64deb3bc798ef4e3c08603d54ae02.tar.xz
qemu-9d5b731dd2d64deb3bc798ef4e3c08603d54ae02.zip
virtio: get_features() can fail
Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
-rw-r--r--hw/net/virtio-net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index e2030582ce..1510839547 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -446,7 +446,8 @@ static void virtio_net_set_queues(VirtIONet *n)
static void virtio_net_set_multiqueue(VirtIONet *n, int multiqueue);
-static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features)
+static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features,
+ Error **errp)
{
VirtIONet *n = VIRTIO_NET(vdev);
NetClientState *nc = qemu_get_queue(n->nic);