]> Pileus Git - ~andy/linux/blobdiff - tools/virtio/virtio_test.c
staging/ozwpan: Mark read only parameters and structs as const
[~andy/linux] / tools / virtio / virtio_test.c
index 6d25dcd2e97a9015da4c927c36b13d3763dc5827..fcc9aa25fd08030856722df41f9322a924582423 100644 (file)
@@ -164,7 +164,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq,
                                r = virtqueue_add_buf(vq->vq, &sl, 1, 0,
                                                      dev->buf + started,
                                                      GFP_ATOMIC);
-                               if (likely(r >= 0)) {
+                               if (likely(r == 0)) {
                                        ++started;
                                        virtqueue_kick(vq->vq);
                                }
@@ -177,7 +177,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq,
                                r = 0;
                        }
 
-               } while (r >= 0);
+               } while (r == 0);
                if (completed == completed_before)
                        ++spurious;
                assert(completed <= bufs);