diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index c0e93ce568..345a301d62 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -652,8 +652,9 @@ static int vhost_vdpa_net_load_mac(VhostVDPAState *s, const VirtIONet *n) if (unlikely(dev_written < 0)) { return dev_written; } - - return *s->status != VIRTIO_NET_OK; + if (*s->status != VIRTIO_NET_OK) { + return -EIO; + } } return 0;