mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
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>
This commit is contained in:
parent
beee1fbe8f
commit
d90a1ca60a
1 changed files with 3 additions and 1 deletions
|
|
@ -475,8 +475,10 @@ static int __write_ring(struct pvcalls_data_intf *intf,
|
|||
virt_mb();
|
||||
|
||||
size = pvcalls_queued(prod, cons, array_size);
|
||||
if (size >= array_size)
|
||||
if (size > array_size)
|
||||
return -EINVAL;
|
||||
if (size == array_size)
|
||||
return 0;
|
||||
if (len > array_size - size)
|
||||
len = array_size - size;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue