aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/vhost-vdpa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 3a6cbc47bb..2c3a9e138f 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -403,8 +403,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;