aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/vhost-vdpa.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 8477ed2579..679ef4bed0 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -718,8 +718,11 @@ static int vhost_vdpa_net_load_offloads(VhostVDPAState *s,
if (unlikely(dev_written < 0)) {
return dev_written;
}
+ if (*s->status != VIRTIO_NET_OK) {
+ return -EIO;
+ }
- return *s->status != VIRTIO_NET_OK;
+ return 0;
}
static int vhost_vdpa_net_load(NetClientState *nc)