File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -116,12 +116,13 @@ static void vhost_vdpa_unsetup_vq_irq(struct vhost_vdpa *v, u16 qid)
116
116
irq_bypass_unregister_producer (& vq -> call_ctx .producer );
117
117
}
118
118
119
- static void vhost_vdpa_reset (struct vhost_vdpa * v )
119
+ static int vhost_vdpa_reset (struct vhost_vdpa * v )
120
120
{
121
121
struct vdpa_device * vdpa = v -> vdpa ;
122
122
123
- vdpa_reset (vdpa );
124
123
v -> in_batch = 0 ;
124
+
125
+ return vdpa_reset (vdpa );
125
126
}
126
127
127
128
static long vhost_vdpa_get_device_id (struct vhost_vdpa * v , u8 __user * argp )
@@ -865,7 +866,9 @@ static int vhost_vdpa_open(struct inode *inode, struct file *filep)
865
866
return - EBUSY ;
866
867
867
868
nvqs = v -> nvqs ;
868
- vhost_vdpa_reset (v );
869
+ r = vhost_vdpa_reset (v );
870
+ if (r )
871
+ goto err ;
869
872
870
873
vqs = kmalloc_array (nvqs , sizeof (* vqs ), GFP_KERNEL );
871
874
if (!vqs ) {
You can’t perform that action at this time.
0 commit comments