virtio_test: verify if virtqueue_kick() succeeded

Verify if a host kick succeeded by checking return value of virtqueue_kick().

Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Heinz Graalfs 2013-10-29 09:40:11 +10:30 committed by Rusty Russell
parent 6797590118
commit 53c18c9906
1 changed files with 2 additions and 1 deletions

View File

@ -172,7 +172,8 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq,
GFP_ATOMIC); GFP_ATOMIC);
if (likely(r == 0)) { if (likely(r == 0)) {
++started; ++started;
virtqueue_kick(vq->vq); if (unlikely(!virtqueue_kick(vq->vq))
r = -1;
} }
} else } else
r = -1; r = -1;