@@ -399,7 +399,10 @@ static int vhost_vdpa_net_data_load(NetClientState *nc)
}
for (int i = 0; i < v->dev->nvqs; ++i) {
- vhost_vdpa_set_vring_ready(v, i + v->dev->vq_index);
+ int ret = vhost_vdpa_set_vring_ready(v, i + v->dev->vq_index);
+ if (ret < 0) {
+ return ret;
+ }
}
return 0;
}
@@ -1238,7 +1241,10 @@ static int vhost_vdpa_net_cvq_load(NetClientState *nc)
assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_VDPA);
- vhost_vdpa_set_vring_ready(v, v->dev->vq_index);
+ r = vhost_vdpa_set_vring_ready(v, v->dev->vq_index);
+ if (unlikely(r < 0)) {
+ return r;
+ }
if (v->shadow_vqs_enabled) {
n = VIRTIO_NET(v->dev->vdev);
@@ -1277,7 +1283,10 @@ static int vhost_vdpa_net_cvq_load(NetClientState *nc)
}
for (int i = 0; i < v->dev->vq_index; ++i) {
- vhost_vdpa_set_vring_ready(v, i);
+ r = vhost_vdpa_set_vring_ready(v, i);
+ if (unlikely(r < 0)) {
+ return r;
+ }
}
return 0;