Skip to content

Commit d90a1ca

Browse files
sstabelliniBoris Ostrovsky
authored andcommitted
pvcalls-front: don't return error when the ring is full
When the ring is full, size == array_size. It is not an error condition, so simply return 0 instead of an error. Signed-off-by: Stefano Stabellini <stefanos@xilinx.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
1 parent beee1fb commit d90a1ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/xen/pvcalls-front.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,10 @@ static int __write_ring(struct pvcalls_data_intf *intf,
475475
virt_mb();
476476

477477
size = pvcalls_queued(prod, cons, array_size);
478-
if (size >= array_size)
478+
if (size > array_size)
479479
return -EINVAL;
480+
if (size == array_size)
481+
return 0;
480482
if (len > array_size - size)
481483
len = array_size - size;
482484

0 commit comments

Comments
 (0)